Updated Intel AMT tab with mouse wheel support.

Ylian Saint-Hilaire committed Feb 24, 2022 at 14:36 UTC 02aa494e32e778d472c4280f7e82e4c405a84f0f
11 files changed +6851 -6814
public/commander-de.htm
+621 -619
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="de" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Verbinden onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Getrennt</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Systemstatus</a><p id=go14 class=nav1 onclick=go(14)><a>Remotedesktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Dateien</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-Informationen</a><p id=go6 class=nav1 onclick=go(6)><a>Ereignisprotokoll</a><p id=go15 class=nav1 onclick=go(15)><a>Audit-Log</a><p id=go21 class=nav1 onclick=go(21)><a>Lager</a><p id=go8 class=nav1 onclick=go(8)><a>Netzwerkeinstellungen</a><p id=go17 class=nav1 onclick=go(17)><a>Interneteinstellungen</a><p id=go16 class=nav1 onclick=go(16)><a>Sicherheitseinstellungen</a><p id=go19 class=nav1 onclick=go(19)><a>Agentenpräsenz</a><p id=go18 class=nav1 onclick=go(18)><a>Systemverteidigung</a><p id=go11 class=nav1 onclick=go(11)><a>Benutzerkonten</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Weckalarme</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Beenden Sie die IDE-R-Sitzung" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Diskette, Blöcke sind 512 Bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, Blöcke sind 2048 Bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Die Firmware dieses Computers sollte aktualisiert werden.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>Bitte überprüfen Sie hier</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Wird geladen...</h1></div><div id=p1 style=display:none><h1>Systemstatus</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-Informationen</h1><span id=16></span></div><div id=p6 style=display:none><h1>Ereignisprotokoll</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netzwerkeinstellungen</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Benutzerkonten</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN Browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Abfrage style=margin:4px onclick=wsmanQuery()><input type=button value=klar style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN-Terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die Serial-over-LAN-Funktion sind deaktiviert<span id=26>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Starten Sie die Erfassung" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Verbinden onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Getrennt.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schalten Sie um, was die Eingabetaste senden soll" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value="80 x 25" title="Terminalgröße umschalten" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schalten Sie den Emulationstyp der Tasten F1 bis F10 um" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Erweiterte Ascii" title="Terminalemulationstyp umschalten" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Rücktaste<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Einfügen disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Remotedesktop</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die KVM-Funktion sind deaktiviert<span id=37>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Nach links drehen" onclick=drotate(-1)>↺</div><div class=rb title="Drehe nach rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schalten Sie den Vollbildmodus um" onkeypress="return false" onkeydown="return false" value=Voll onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Speichern Sie einen Screenshot des Remotedesktops" onkeypress="return false" onkeydown="return false" value=Speichern... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Die Einstellungen..." title="Bearbeiten Sie die Remotedesktopeinstellungen" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Ändern Sie den Energiezustand des Remote-Computers" onkeypress="return false" onkeydown="return false" value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Verbinden onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Getrennt.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Sieg<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L.<option value=4>Win + M.<option value=20>Win + R.<option value=23>Gewinnen + Links<option value=24>Win + Right<option value=5>Umschalt + Win + M.<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Strg-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Strg-Alt-Entf onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Art onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Leerer Bildschirm&nbsp;</span><span id=47><input id=48 type=checkbox>Nur anschauen&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Audit-Log</h1><span id=50></span></div><div id=p16 style=display:none><h1>Sicherheitseinstellungen</h1><span id=51></span></div><div id=p17 style=display:none><h1>Interneteinstellungen</h1><span id=52></span></div><div id=p18 style=display:none><h1>Systemverteidigung</h1><span id=53></span></div><div id=p19 style=display:none><h1>Agentenpräsenz</h1><span id=54></span></div><div id=p21 style=display:none><h1>Lager</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event-Abonnements</h1><span id=56></span></div><div id=p23 style=display:none><h1>Weckalarme</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Dateien</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Oben>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Wählen Sie Alle" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Umbenennen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Löschen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Neuer Ordner" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Hochladen onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Schnitt onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopieren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Einfügen onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Aktualisierung onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Nach Name sortieren<option value=2>Nach Größe sortiert<option value=3>Nach Datum sortieren<option value=4>Mit Namen absteigen<option value=5>Nach Größe absteigen<option value=6>Abstieg nach Datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nutzername</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Passwort*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Kennwort bestätigen</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokal<option value=1>Netzwerk<option value=2>Irgendein</select><div>Genehmigung</div></div><div>Erteilte Berechtigungen</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Mindestens 8 Zeichen mit Groß-, Klein-, 0-9 und einem von! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Power Action</div></div><div><span style=color:red>Warnung:</span>Einige Stromversorgungsaktionen können zu Datenverlust führen und die Desktop-, Terminal- oder Festplattenumleitungssitzungen trennen.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Zustimmungscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primäre Anzeige<option value=1>Sekundäranzeige<option id=d6ThirdDisplay value=2 style=display:none>Dritte Anzeige</select><div>Zustimmungsanzeige</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Bildcodierung</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Lokalen Mauszeiger anzeigen</label><br><label><input type=checkbox id=d7showcad>Zeigen Sie Strg-Alt-Entf</label><br><label><input type=checkbox id=d7limitFrameRate>Begrenzte Bildrate</label><br><label><input type=checkbox id=d7noMouseRotate>Maus nicht drehen</label><br></div><div>Andere Einstellungen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualität</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Skalierung</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Administrator style=float:right;width:220px><div style=height:20px>Nutzername</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Passwort</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Umleitungsport</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM-Remotedesktop</label><label style=display:block><input type=checkbox id=c17>IDE-Umleitung<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Nicht benötigt<br></label><label><input type=radio name=d10 id=c20 value=1>Nur für KVM erforderlich<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Immer erforderlich<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">Profilname</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorität</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>Wpa psk</select><div>Authentifizierung</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Keiner</select><div>Verschlüsselung</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Passwort*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Kennwort bestätigen</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Dadurch wird der gesamte Status von Intel® AMT für diesen Computer in einer Datei gespeichert. Passwörter werden nicht gespeichert, es können jedoch einige vertrauliche Daten enthalten sein.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Behindert<br><input type=radio name=d20 id=d20b value=1>ICMP-Antwort<br><input type=radio name=d20 id=d20c value=2>RMCP-Antwort<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP Antwort<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisierung der IP-Adresse des Betriebssystems</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP Adresse</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetzmarke</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Tor</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primärer DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatives DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Behindert<option value=1>Deaktiviert, DHCP-Update<option value=2>aktiviert</select><div>Dynamischer DNS-Client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Aktualisierungsintervall (Minuten)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (Sekunden)</div></div><div style=font-size:10px><br>Das Standardintervall beträgt 1440 Minuten, die Standard-TTL beträgt 900 Sekunden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Einschalten<option value=10>Zurücksetzen<option value=5>Aus- und Wiedereinschalten<option value=8>Stromausfall<option id=d24p500 value=500>OS Wake aus dem Standby<option id=d24p501 value=501>Energiesparen des Betriebssystems<option value=999>Legen Sie die Startoptionen fest</select><div>Fernbefehl</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS-Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Erzwingen Sie einen sicheren Start</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Fortschrittsereignisse erzwingen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Netzschalter sperren</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-Taste sperren</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Schlaftaste sperren</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Tastatur sperren</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-Passwort-Bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS neu starten</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Sicherheitsmodus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Verwenden Sie IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Starteinstellungen</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Keiner<option id=ForceDVDBootOption value=1>CD / DVD-Start erzwingen<option id=ForcePXEBootOption value=2>PXE-Start erzwingen<option id=ForceHDBootOption value=3>Festplattenstart erzwingen<option id=ForceDiagBootOption value=4>Diagnosestart erzwingen</select><div>Boot-Quelle</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Keiner<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Booten Sie auf Diskette<option value=1>Booten Sie auf CD-ROM</select><div>IDER-Startgerät</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systemfehler<option id=c46 value=1>Ruhig<option id=c47 value=2>Ausführlich<option id=c48 value=3>Leerer Bildschirm</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE-Passwort</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarmname</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Weckdatum (Jahr-Monat-Tag)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Weckzeit (Stunde: Min: Sek)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervall (Tage-Stunden-Min.)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Alarm halten<option value=1>Nach Abschluss löschen</select></div><div style=padding-top:4px>Nach dem Aufwachen</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>aktiviert<br></label><label><input type=radio name=d26b id=c50 value=0>Behindert<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>aktiviert<br></label><label><input type=radio name=d26a id=c52 value=0>Behindert<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Stornieren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Löschen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="de" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Verbinden onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Getrennt</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Systemstatus</a><p id=go14 class=nav1 onclick=go(14)><a>Remotedesktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Dateien</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-Informationen</a><p id=go6 class=nav1 onclick=go(6)><a>Ereignisprotokoll</a><p id=go15 class=nav1 onclick=go(15)><a>Audit-Log</a><p id=go21 class=nav1 onclick=go(21)><a>Lager</a><p id=go8 class=nav1 onclick=go(8)><a>Netzwerkeinstellungen</a><p id=go17 class=nav1 onclick=go(17)><a>Interneteinstellungen</a><p id=go16 class=nav1 onclick=go(16)><a>Sicherheitseinstellungen</a><p id=go19 class=nav1 onclick=go(19)><a>Agentenpräsenz</a><p id=go18 class=nav1 onclick=go(18)><a>Systemverteidigung</a><p id=go11 class=nav1 onclick=go(11)><a>Benutzerkonten</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Weckalarme</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Beenden Sie die IDE-R-Sitzung" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Diskette, Blöcke sind 512 Bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, Blöcke sind 2048 Bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Die Firmware dieses Computers sollte aktualisiert werden.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>Bitte überprüfen Sie hier</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Wird geladen...</h1></div><div id=p1 style=display:none><h1>Systemstatus</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-Informationen</h1><span id=16></span></div><div id=p6 style=display:none><h1>Ereignisprotokoll</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netzwerkeinstellungen</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Benutzerkonten</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN Browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Abfrage style=margin:4px onclick=wsmanQuery()><input type=button value=klar style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN-Terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die Serial-over-LAN-Funktion sind deaktiviert<span id=26>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Starten Sie die Erfassung" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Verbinden onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Getrennt.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schalten Sie um, was die Eingabetaste senden soll" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value="80 x 25" title="Terminalgröße umschalten" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schalten Sie den Emulationstyp der Tasten F1 bis F10 um" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Erweiterte Ascii" title="Terminalemulationstyp umschalten" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Rücktaste<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Einfügen disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Remotedesktop</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Intel® AMT-Umleitungsport oder die KVM-Funktion sind deaktiviert<span id=37>Klicken Sie hier, um es zu aktivieren.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Der Remotecomputer ist nicht eingeschaltet. Klicken Sie hier, um einen Energiebefehl auszugeben.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Nach links drehen" onclick=drotate(-1)>↺</div><div class=rb title="Drehe nach rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schalten Sie den Vollbildmodus um" onkeypress="return false" onkeydown="return false" value=Voll onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Speichern Sie einen Screenshot des Remotedesktops" onkeypress="return false" onkeydown="return false" value=Speichern... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Die Einstellungen..." title="Bearbeiten Sie die Remotedesktopeinstellungen" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Starten Sie den Remote-Festplatten-Mount-Vorgang" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Ändern Sie den Energiezustand des Remote-Computers" onkeypress="return false" onkeydown="return false" value="Machtaktionen ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Verbinden onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Getrennt.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Sieg<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L.<option value=4>Win + M.<option value=20>Win + R.<option value=23>Gewinnen + Links<option value=24>Win + Right<option value=5>Umschalt + Win + M.<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Strg-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Senden onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Strg-Alt-Entf onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Art onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Leerer Bildschirm&nbsp;</span><span id=47><input id=48 type=checkbox>Nur anschauen&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Audit-Log</h1><span id=50></span></div><div id=p16 style=display:none><h1>Sicherheitseinstellungen</h1><span id=51></span></div><div id=p17 style=display:none><h1>Interneteinstellungen</h1><span id=52></span></div><div id=p18 style=display:none><h1>Systemverteidigung</h1><span id=53></span></div><div id=p19 style=display:none><h1>Agentenpräsenz</h1><span id=54></span></div><div id=p21 style=display:none><h1>Lager</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event-Abonnements</h1><span id=56></span></div><div id=p23 style=display:none><h1>Weckalarme</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Dateien</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Oben>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Wählen Sie Alle" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Umbenennen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Löschen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Neuer Ordner" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Hochladen onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Schnitt onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopieren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Einfügen onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Aktualisierung onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Nach Name sortieren<option value=2>Nach Größe sortiert<option value=3>Nach Datum sortieren<option value=4>Mit Namen absteigen<option value=5>Nach Größe absteigen<option value=6>Abstieg nach Datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nutzername</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Passwort*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Kennwort bestätigen</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokal<option value=1>Netzwerk<option value=2>Irgendein</select><div>Genehmigung</div></div><div>Erteilte Berechtigungen</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Mindestens 8 Zeichen mit Groß-, Klein-, 0-9 und einem von! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Power Action</div></div><div><span style=color:red>Warnung:</span>Einige Stromversorgungsaktionen können zu Datenverlust führen und die Desktop-, Terminal- oder Festplattenumleitungssitzungen trennen.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Zustimmungscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primäre Anzeige<option value=1>Sekundäranzeige<option id=d6ThirdDisplay value=2 style=display:none>Dritte Anzeige</select><div>Zustimmungsanzeige</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Bildcodierung</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Behindert<option value=2>Automatic<option value=3>aktiviert</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Lokalen Mauszeiger anzeigen</label><br><label><input type=checkbox id=d7showcad>Zeigen Sie Strg-Alt-Entf</label><br><label><input type=checkbox id=d7limitFrameRate>Begrenzte Bildrate</label><br><label><input type=checkbox id=d7noMouseRotate>Maus nicht drehen</label><br></div><div>Andere Einstellungen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualität</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Skalierung</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Administrator style=float:right;width:220px><div style=height:20px>Nutzername</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Passwort</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Umleitungsport</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM-Remotedesktop</label><label style=display:block><input type=checkbox id=c17>IDE-Umleitung<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Nicht benötigt<br></label><label><input type=radio name=d10 id=c20 value=1>Nur für KVM erforderlich<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Immer erforderlich<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">Profilname</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximal 32 Zeichen"><div title="Maximal 32 Zeichen">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorität</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>Wpa psk</select><div>Authentifizierung</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Keiner</select><div>Verschlüsselung</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Passwort*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Länge zwischen 8 und 63 Zeichen"><div title="Länge zwischen 8 und 63 Zeichen">Kennwort bestätigen</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Dadurch wird der gesamte Status von Intel® AMT für diesen Computer in einer Datei gespeichert. Passwörter werden nicht gespeichert, es können jedoch einige vertrauliche Daten enthalten sein.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Behindert<br><input type=radio name=d20 id=d20b value=1>ICMP-Antwort<br><input type=radio name=d20 id=d20c value=2>RMCP-Antwort<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP Antwort<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisierung der IP-Adresse des Betriebssystems</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP Adresse</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetzmarke</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Tor</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primärer DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatives DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Behindert<option value=1>Deaktiviert, DHCP-Update<option value=2>aktiviert</select><div>Dynamischer DNS-Client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Aktualisierungsintervall (Minuten)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (Sekunden)</div></div><div style=font-size:10px><br>Das Standardintervall beträgt 1440 Minuten, die Standard-TTL beträgt 900 Sekunden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Einschalten<option value=10>Zurücksetzen<option value=5>Aus- und Wiedereinschalten<option value=8>Stromausfall<option id=d24p500 value=500>OS Wake aus dem Standby<option id=d24p501 value=501>Energiesparen des Betriebssystems<option value=999>Legen Sie die Startoptionen fest</select><div>Fernbefehl</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS-Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Erzwingen Sie einen sicheren Start</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Fortschrittsereignisse erzwingen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Netzschalter sperren</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-Taste sperren</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Schlaftaste sperren</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Tastatur sperren</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-Passwort-Bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS neu starten</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Sicherheitsmodus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Verwenden Sie IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Starteinstellungen</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Keiner<option id=ForceDVDBootOption value=1>CD / DVD-Start erzwingen<option id=ForcePXEBootOption value=2>PXE-Start erzwingen<option id=ForceHDBootOption value=3>Festplattenstart erzwingen<option id=ForceDiagBootOption value=4>Diagnosestart erzwingen</select><div>Boot-Quelle</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Keiner<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Booten Sie auf Diskette<option value=1>Booten Sie auf CD-ROM</select><div>IDER-Startgerät</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systemfehler<option id=c46 value=1>Ruhig<option id=c47 value=2>Ausführlich<option id=c48 value=3>Leerer Bildschirm</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE-Passwort</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarmname</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Weckdatum (Jahr-Monat-Tag)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Weckzeit (Stunde: Min: Sek)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervall (Tage-Stunden-Min.)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Alarm halten<option value=1>Nach Abschluss löschen</select></div><div style=padding-top:4px>Nach dem Aufwachen</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>aktiviert<br></label><label><input type=radio name=d26b id=c50 value=0>Behindert<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>aktiviert<br></label><label><input type=radio name=d26a id=c52 value=0>Behindert<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Stornieren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Löschen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,176 +12,176 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Ung\u00fcltige Daten";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Ung\u00fcltige Daten";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"Agent Watchdog"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... gewechselt zu"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Fall Eindringen";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Eine Remote-Serial-Over-LAN-Sitzung wurde eingerichtet.";if(1==c[2])return"Remote Serial Over LAN-Sitzung beendet. Die Benutzersteuerung wurde wiederhergestellt.";if(2==c[2])return"Eine Remote-IDE-Umleitungssitzung wurde eingerichtet.";
93 +a&&170==c[0])return"Agent Watchdog"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... gewechselt zu"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Fall Eindringen";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Eine Remote-Serial-Over-LAN-Sitzung wurde eingerichtet.";if(1==c[2])return"Remote Serial Over LAN-Sitzung beendet. Die Benutzersteuerung wurde wiederhergestellt.";if(2==c[2])return"Eine Remote-IDE-Umleitungssitzung wurde eingerichtet.";
94 if(3==c[2])return"Remote-IDE-Umleitungssitzung beendet. Die Benutzersteuerung wurde wiederhergestellt."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="verdrahtet"),4294967293==a?"Alle empfangenen Paketfilter wurden abgeglichen"+b+" Schnittstelle.":4294967292==a?"Alle ausgehenden Paketfilter wurden abgeglichen"+b+" Schnittstelle.":4294967290==a?"Der gef\u00e4lschte Paketfilter wurde angepasst"+b+" Schnittstelle.":"Filter"+a+" wurde auf abgestimmt"+b+" Schnittstelle.";
95 if(192==a)return 0==c[2]?"Sicherheitsrichtlinie aufgerufen. Ein Teil oder der gesamte Netzwerkverkehr (TX) wurde gestoppt.":2==c[2]?"Sicherheitsrichtlinie aufgerufen. Ein Teil oder der gesamte Netzwerkverkehr (RX) wurde gestoppt.":"Sicherheitsrichtlinie aufgerufen.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Benutzeranforderung f\u00fcr Remoteverbindung.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC-Fehler: Versuchen Sie, die Haltung zu ermitteln, w\u00e4hrend NAC in Intel AMT deaktiviert ist.";
96 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA-Fehler: Allgemeiner Fehler"}return 6==a?"Authentifizierung fehlgeschlagen"+(c[1]+(c[2]<<8))+" mal. Das System wird m\u00f6glicherweise angegriffen.":30==a?"Keine bootf\u00e4higen Medien":32==a?"Betriebssystemsperre oder Stromunterbrechung":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Systemstartfehler":37==a?"Die Systemfirmware wurde gestartet (mindestens eine CPU wird ordnungsgem\u00e4\u00df ausgef\u00fchrt).":"Unbekannter Sensortyp #"+
97 -a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),
98 -b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>Lokal</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-Standardport</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*
99 -b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+
100 -h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),
101 -b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,
102 -execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;
103 -c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&
104 -(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
108 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
110 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
111 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
112 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
113 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
115 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
116 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
118 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
120 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
121 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
122 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
123 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
125 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
127 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
128 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
130 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
133 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
134 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
135 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
137 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
138 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
139 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
142 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
143 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
144 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
145 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
148 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
149 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
150 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
97 +a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
98 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Lokal</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-Standardport</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*
99 +b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+
100 +g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),
101 +b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,
102 +execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;
103 +c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&
104 +(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
108 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
110 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
111 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
112 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
113 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
115 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
116 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
118 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
120 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
121 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
122 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
123 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
125 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
127 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
128 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
130 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
133 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
134 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
135 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
137 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
138 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
139 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
140 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
142 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
143 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
144 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
145 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
148 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
149 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
150 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
152 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
153 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
154 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
155 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
156 -[a,b,[]])};var E="Nicht spezifiziert. ; Kein Systemspeicher ist physisch im System installiert. ; Kein verwendbarer Systemspeicher, der gesamte installierte Speicher hat einen nicht behebbaren Fehler. ; Nicht behebbarer Festplatten- / ATAPI / IDE-Ger\u00e4tefehler. ; Nicht behebbarer Systemplatinenfehler. ; Nicht behebbare Diskette Subsystemfehler. ; Nicht behebbarer Festplattencontrollerfehler. ; Nicht behebbarer PS / 2- oder USB-Tastaturfehler. ; Wechselmedium nicht gefunden. ; Nicht behebbarer Videocontrollerfehler. ; Kein Videoger\u00e4t erkannt. ; Firmware (BIOS) -ROM-Besch\u00e4digung erkannt. ; Nicht \u00fcbereinstimmende CPU-Spannung (Prozessoren mit derselben Versorgung haben nicht \u00fcbereinstimmende Spannungsanforderungen) ; Fehler bei der Anpassung der CPU-Geschwindigkeit".split(";"),
157 -m="Nicht spezifiziert. ; Speicherinitialisierung. ; Festplatteninitialisierung und -test starten. Initialisierung der Sekund\u00e4rprozessoren. Benutzerauthentifizierung. Benutzerinitiiertes System-Setup. USB-Ressourcenkonfiguration. PCI-Ressourcenkonfiguration. Option ROM-Initialisierung. Video-Initialisierung. Cache-Initialisierung. SM Businitialisierung ; Initialisierung des Tastaturcontrollers ; Initialisierung des eingebetteten Controllers / Verwaltungscontrollers ; Anschlie\u00dfen der Dockingstation ; Aktivieren der Dockingstation ; Auswerfen der Dockingstation ; Deaktivieren der Dockingstation ; Aufrufen des Aufweckvektors des Betriebssystems ; Starten des Startvorgangs des Betriebssystems ; Initialisierung des Baseboards oder Motherboards ; reserviert ; Disketteninitialisierung ; Tastaturtest ; Zeigeger\u00e4tetest ; Prim\u00e4rprozessorinitialisierung".split(";"),
155 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
156 +[a,b,[]])};var D="Nicht spezifiziert. ; Kein Systemspeicher ist physisch im System installiert. ; Kein verwendbarer Systemspeicher, der gesamte installierte Speicher hat einen nicht behebbaren Fehler. ; Nicht behebbarer Festplatten- / ATAPI / IDE-Ger\u00e4tefehler. ; Nicht behebbarer Systemplatinenfehler. ; Nicht behebbare Diskette Subsystemfehler. ; Nicht behebbarer Festplattencontrollerfehler. ; Nicht behebbarer PS / 2- oder USB-Tastaturfehler. ; Wechselmedium nicht gefunden. ; Nicht behebbarer Videocontrollerfehler. ; Kein Videoger\u00e4t erkannt. ; Firmware (BIOS) -ROM-Besch\u00e4digung erkannt. ; Nicht \u00fcbereinstimmende CPU-Spannung (Prozessoren mit derselben Versorgung haben nicht \u00fcbereinstimmende Spannungsanforderungen) ; Fehler bei der Anpassung der CPU-Geschwindigkeit".split(";"),
157 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
158 k="Nicht spezifiziert ; Andere ; Unbekannt ; Prozessor ; Festplatte ; Peripherieger\u00e4t ; Systemverwaltungsmodul ; Systemplatine ; Speichermodul ; Prozessormodul ; Stromversorgung ; Karte hinzuf\u00fcgen ; Frontplatine ; R\u00fcckwandplatine ; Stromversorgungsplatine ; Antriebsr\u00fcckwandplatine ; Systeminterne Erweiterung Karte ; Andere Systemplatine ; Prozessorkarte ; Netzteil ; Leistungsmodul ; Energieverwaltungskarte ; Geh\u00e4use-R\u00fcckwandplatine ; Systemgeh\u00e4use ; Untergeh\u00e4use ; Andere Geh\u00e4useplatine ; Festplattenschacht ; Peripheriefachschacht ; Ger\u00e4teschacht ; L\u00fcfterk\u00fchlung ; K\u00fchleinheit ; Kabelverbindung ; Speicherger\u00e4t ; Systemverwaltungssoftware ; BIOS ; Intel (r) ME ; Systembus ; Gruppe ; Intel (r) ME ; Externe Umgebung ; Batterie ; Verarbeitungsblatt ; Konnektivit\u00e4tsschalter ; Prozessor / Speichermodul ; E / A-Modul ; Prozessor-E / A-Modul ; Firmware des Management-Controllers ; IPMI-Kanal ; PCI-Bus ; PCI-Express-Bus ; SCSI-Bus ; SATA / SAS-Bus ; Prozessor-Front-Side-Bus".split(";");
159 -h.RealmNames=";; Umleitung ;; Hardware-Asset ; Fernbedienung ; Speicher ; Event Manager ; Speicheradministrator ; Agentenpr\u00e4senz Lokal ; Agentenpr\u00e4senz Remote ; Leistungsschalter ; Netzwerkzeit ; Allgemeine Informationen ; Firmware-Aktualisierung ; EIT ; LocalUN ; Endpunktzugriffskontrolle ; Endpunktzugriffskontrolle Admin ; Ereignisprotokollleser ; \u00dcberwachungsprotokoll ; ACL-Bereich ;;; Lokales System".split(";");h.WatchdogCurrentStates={1:"Nicht angefangen",2:"Gestoppt",4:"Laufen",
160 -8:"Abgelaufen",16:"Suspendiert"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",
161 -8:"WinRE"},D={16:"Sicherheitsadministrator",17:"RCO",18:"Umleitungsmanager",19:"Firmware Update Manager",20:"Sicherheits\u00fcberwachungsprotokoll",21:"Netzwerkzeit",22:"Netzwerkadministration",23:"Speicherverwaltung",24:"Event Manager",25:"Leistungsschalter-Manager",26:"Agent Presence Manager",27:"Drahtlose Konfiguration",28:"EAC",29:"KVM",30:"Benutzer-Opt-In-Ereignisse",32:"Bildschirmausblendung",33:"Watchdog-Ereignisse",1600:"Bereitstellung gestartet",1601:"Bereitstellung abgeschlossen",1602:"ACL-Eintrag hinzugef\u00fcgt",
159 +g.RealmNames=";; Umleitung ;; Hardware-Asset ; Fernbedienung ; Speicher ; Event Manager ; Speicheradministrator ; Agentenpr\u00e4senz Lokal ; Agentenpr\u00e4senz Remote ; Leistungsschalter ; Netzwerkzeit ; Allgemeine Informationen ; Firmware-Aktualisierung ; EIT ; LocalUN ; Endpunktzugriffskontrolle ; Endpunktzugriffskontrolle Admin ; Ereignisprotokollleser ; \u00dcberwachungsprotokoll ; ACL-Bereich ;;; Lokales System".split(";");g.WatchdogCurrentStates={1:"Nicht angefangen",2:"Gestoppt",4:"Laufen",
160 +8:"Abgelaufen",16:"Suspendiert"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",
161 +8:"WinRE"},C={16:"Sicherheitsadministrator",17:"RCO",18:"Umleitungsmanager",19:"Firmware Update Manager",20:"Sicherheits\u00fcberwachungsprotokoll",21:"Netzwerkzeit",22:"Netzwerkadministration",23:"Speicherverwaltung",24:"Event Manager",25:"Leistungsschalter-Manager",26:"Agent Presence Manager",27:"Drahtlose Konfiguration",28:"EAC",29:"KVM",30:"Benutzer-Opt-In-Ereignisse",32:"Bildschirmausblendung",33:"Watchdog-Ereignisse",1600:"Bereitstellung gestartet",1601:"Bereitstellung abgeschlossen",1602:"ACL-Eintrag hinzugef\u00fcgt",
162 1603:"ACL-Eintrag ge\u00e4ndert",1604:"ACL-Eintrag entfernt",1605:"ACL-Zugriff mit ung\u00fcltigen Anmeldeinformationen",1606:"ACL-Eingangsstatus",1607:"TLS-Status ge\u00e4ndert",1608:"TLS Server Certificate Set",1609:"TLS-Serverzertifikat entfernen",1610:"TLS Trusted Root Certificate hinzugef\u00fcgt",1611:"TLS Trusted Root Certificate entfernt",1612:"TLS Preshared Key Set",1613:"Kerberos-Einstellungen ge\u00e4ndert",1614:"Kerberos-Hauptschl\u00fcssel ge\u00e4ndert",1615:"Blitzverschlei\u00dfz\u00e4hler zur\u00fcckgesetzt",
163 -1616:"Netzteil ge\u00e4ndert",1617:"Stellen Sie den Realm-Authentifizierungsmodus ein",1618:"Aktualisieren Sie den Client auf den Admin-Steuerungsmodus",1619:"Unprovisioning gestartet",1700:"Power Up durchgef\u00fchrt",1701:"Power Down durchgef\u00fchrt",1702:"Aus- und Wiedereinschalten",1703:"Reset durchgef\u00fchrt",1704:"Legen Sie die Startoptionen fest",1800:"IDER-Sitzung ge\u00f6ffnet",1801:"IDER-Sitzung geschlossen",1802:"IDER aktiviert",1803:"IDER deaktiviert",1804:"SoL-Sitzung er\u00f6ffnet",
164 -1805:"SoL-Sitzung geschlossen",1806:"SoL aktiviert",1807:"SoL deaktiviert",1808:"KVM-Sitzung gestartet",1809:"KVM-Sitzung beendet",1810:"KVM aktiviert",1811:"KVM deaktiviert",1812:"Das VNC-Passwort ist dreimal fehlgeschlagen",1900:"Firmware aktualisiert",1901:"Firmware-Aktualisierung fehlgeschlagen",2E3:"Sicherheits\u00fcberwachungsprotokoll gel\u00f6scht",2001:"Sicherheits\u00fcberpr\u00fcfungsrichtlinie ge\u00e4ndert",2002:"Sicherheits\u00fcberwachungsprotokoll deaktiviert",2003:"Sicherheits\u00fcberwachungsprotokoll aktiviert",
165 -2004:"Sicherheits\u00fcberwachungsprotokoll exportiert",2005:"Sicherheits\u00fcberwachungsprotokoll wiederhergestellt",2100:"Intel&reg; ME Zeiteinstellung",2200:"TCPIP-Parameter eingestellt",2201:"Hostname festgelegt",2202:"Domain Name Set",2203:"VLAN-Parameter eingestellt",2204:"Link Policy Set",2205:"IPv6-Parameter festgelegt",2300:"Globale Speicherattribute festgelegt",2301:"Speicher EACL ge\u00e4ndert",2302:"Speicher FPACL ge\u00e4ndert",2303:"Speicherschreibvorgang",2400:"Benachrichtigung abonniert",
166 -2401:"Benachrichtigung abbestellt",2402:"Ereignisprotokoll gel\u00f6scht",2403:"Ereignisprotokoll eingefroren",2500:"CB-Filter hinzugef\u00fcgt",2501:"CB-Filter entfernt",2502:"CB-Richtlinie hinzugef\u00fcgt",2503:"CB-Richtlinie entfernt",2504:"CB-Standardrichtliniensatz",2505:"CB Heuristik Optionsset",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog hinzugef\u00fcgt",2601:"Agent Watchdog entfernt",2602:"Agent Watchdog-Aktionssatz",2700:"Drahtloses Profil hinzugef\u00fcgt",2701:"Drahtloses Profil entfernt",
167 -2702:"Drahtloses Profil aktualisiert",2800:"EAC Posture Signer SET",2801:"EAC aktiviert",2802:"EAC deaktiviert",2803:"EAC Posture State",2804:"EAC-Set-Optionen",2900:"KVM-Anmeldung aktiviert",2901:"KVM-Anmeldung deaktiviert",2902:"KVM-Passwort ge\u00e4ndert",2903:"KVM-Zustimmung erfolgreich",2904:"KVM-Zustimmung fehlgeschlagen",3E3:"\u00c4nderung der Opt-In-Richtlinie",3001:"Einwilligungscode-Ereignis senden",3002:"Starten Sie das blockierte Opt-In-Ereignis"};h.GetAuditLogExtendedDataStr=function(a,
168 -b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Ung\u00fcltiger ME-Zugriff","Ung\u00fcltiger MEBx-Zugriff"][b.charCodeAt(0)];if(1606==a){var c=["Behindert","aktiviert"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Fernbedienung"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:
169 -1617==a?h.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Behindert"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Lokale MEI","Lokaler WSMAN","Remote-WSAMN"][b.charCodeAt(0)]:1900==a?"Von"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" zu"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Von"+["Keiner","KVM","Alle"][b.charCodeAt(0)]+" zu"+
170 -["Keiner","KVM","Alle"][b.charCodeAt(1)]:3001==a?["Erfolg","3 mal fehlgeschlagen"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
171 -function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
163 +1616:"Netzteil ge\u00e4ndert",1617:"Stellen Sie den Realm-Authentifizierungsmodus ein",1618:"Aktualisieren Sie den Client auf den Admin-Steuerungsmodus",1619:"Unprovisioning gestartet",1700:"Power Up durchgef\u00fchrt",1701:"Power Down durchgef\u00fchrt",1702:"Aus- und Wiedereinschalten",1703:"Reset durchgef\u00fchrt",1704:"Legen Sie die Startoptionen fest",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",
164 +1709:"Remote NMI initiated",1800:"IDER-Sitzung ge\u00f6ffnet",1801:"IDER-Sitzung geschlossen",1802:"IDER aktiviert",1803:"IDER deaktiviert",1804:"SoL-Sitzung er\u00f6ffnet",1805:"SoL-Sitzung geschlossen",1806:"SoL aktiviert",1807:"SoL deaktiviert",1808:"KVM-Sitzung gestartet",1809:"KVM-Sitzung beendet",1810:"KVM aktiviert",1811:"KVM deaktiviert",1812:"Das VNC-Passwort ist dreimal fehlgeschlagen",1900:"Firmware aktualisiert",1901:"Firmware-Aktualisierung fehlgeschlagen",2E3:"Sicherheits\u00fcberwachungsprotokoll gel\u00f6scht",
165 +2001:"Sicherheits\u00fcberpr\u00fcfungsrichtlinie ge\u00e4ndert",2002:"Sicherheits\u00fcberwachungsprotokoll deaktiviert",2003:"Sicherheits\u00fcberwachungsprotokoll aktiviert",2004:"Sicherheits\u00fcberwachungsprotokoll exportiert",2005:"Sicherheits\u00fcberwachungsprotokoll wiederhergestellt",2100:"Intel&reg; ME Zeiteinstellung",2200:"TCPIP-Parameter eingestellt",2201:"Hostname festgelegt",2202:"Domain Name Set",2203:"VLAN-Parameter eingestellt",2204:"Link Policy Set",2205:"IPv6-Parameter festgelegt",
166 +2300:"Globale Speicherattribute festgelegt",2301:"Speicher EACL ge\u00e4ndert",2302:"Speicher FPACL ge\u00e4ndert",2303:"Speicherschreibvorgang",2400:"Benachrichtigung abonniert",2401:"Benachrichtigung abbestellt",2402:"Ereignisprotokoll gel\u00f6scht",2403:"Ereignisprotokoll eingefroren",2500:"CB-Filter hinzugef\u00fcgt",2501:"CB-Filter entfernt",2502:"CB-Richtlinie hinzugef\u00fcgt",2503:"CB-Richtlinie entfernt",2504:"CB-Standardrichtliniensatz",2505:"CB Heuristik Optionsset",2506:"CB Heuristics State Cleared",
167 +2600:"Agent Watchdog hinzugef\u00fcgt",2601:"Agent Watchdog entfernt",2602:"Agent Watchdog-Aktionssatz",2700:"Drahtloses Profil hinzugef\u00fcgt",2701:"Drahtloses Profil entfernt",2702:"Drahtloses Profil aktualisiert",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC aktiviert",2802:"EAC deaktiviert",2803:"EAC Posture State",2804:"EAC-Set-Optionen",
168 +2900:"KVM-Anmeldung aktiviert",2901:"KVM-Anmeldung deaktiviert",2902:"KVM-Passwort ge\u00e4ndert",2903:"KVM-Zustimmung erfolgreich",2904:"KVM-Zustimmung fehlgeschlagen",3E3:"\u00c4nderung der Opt-In-Richtlinie",3001:"Einwilligungscode-Ereignis senden",3002:"Starten Sie das blockierte Opt-In-Ereignis",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==
169 +a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Ung\u00fcltiger ME-Zugriff","Ung\u00fcltiger MEBx-Zugriff"][b.charCodeAt(0)];if(1606==a){var c=["Behindert","aktiviert"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Fernbedienung"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,
170 +0)]+","+["NoAuth","Auth","Behindert"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Lokale MEI","Lokaler WSMAN","Remote-WSAMN"][b.charCodeAt(0)]:1900==a?"Von"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" zu"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Von"+["Keiner","KVM","Alle"][b.charCodeAt(0)]+" zu"+["Keiner","KVM","Alle"][b.charCodeAt(1)]:
171 +3001==a?["Erfolg","3 mal fehlgeschlagen"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
172 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
173 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
174 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
175 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
176 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
177 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
178 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
179 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
180 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
181 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
182 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
183 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
184 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
176 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
177 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
178 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
179 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
180 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
181 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
182 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
183 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
184 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
185 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
186 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
187 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -192,10 +192,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
192 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
193 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
194 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
195 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
195 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
196 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
197 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
198 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
197 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
198 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
199 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
200 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
201 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -205,69 +205,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
205 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
206 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
207 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
208 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
209 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
210 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
211 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
212 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
213 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
214 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
215 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
208 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
209 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
210 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
211 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
212 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
213 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
214 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
215 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
216 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
217 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
218 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
219 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
220 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
221 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
222 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
223 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
224 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
225 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
226 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
227 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
228 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
229 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
230 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
217 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
218 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
219 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
220 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
221 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
222 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
223 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
224 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
225 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
226 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
227 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
228 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
229 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
230 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
231 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
232 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
233 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
234 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
235 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
236 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
237 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
235 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
236 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
237 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
238 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
239 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
240 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
241 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
242 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
243 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
244 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
245 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
246 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
247 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
248 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
249 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
250 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
243 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
244 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
245 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
246 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
247 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
248 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
249 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
250 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
251 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
252 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
253 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
254 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
255 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
256 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
257 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
258 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
259 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
260 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
261 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
262 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
263 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
264 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
265 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
266 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
254 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
255 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
256 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
257 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
258 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
259 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
260 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
261 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
262 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
263 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
264 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
265 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
266 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
267 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
268 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
269 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
270 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
268 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
269 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
270 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
271 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
272 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
273 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -281,213 +281,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
281 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
282 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
283 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
284 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
284 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
285 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
286 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
287 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
288 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
289 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
290 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
291 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
292 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
293 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
286 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
287 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
288 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
289 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
290 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
291 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
292 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
293 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
294 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
295 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
296 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
297 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
295 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
296 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
297 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
298 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
299 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
300 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
300 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
301 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
302 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
302 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
303 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
304 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
305 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
306 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
307 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
308 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
309 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
310 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
311 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
312 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
313 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
314 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
315 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
316 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
304 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
305 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
306 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
307 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
308 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
309 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
310 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
311 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
312 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
313 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
314 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
315 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
316 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
317 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
318 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
319 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
320 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
321 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
322 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
323 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
324 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
325 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
326 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
318 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
319 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
320 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
321 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
322 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
323 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
324 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
325 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
326 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
327 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
328 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
329 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
330 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
331 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
332 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
333 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
334 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
335 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
336 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
337 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
338 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
333 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
334 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
335 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
336 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
337 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
338 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
339 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
340 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
340 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
341 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
342 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
343 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
344 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
345 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
346 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
347 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
348 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
349 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
350 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
351 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
342 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
343 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
344 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
345 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
346 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
347 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
348 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
349 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
350 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
351 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
352 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
353 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
354 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
355 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
356 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
357 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
353 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
354 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
355 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
356 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
357 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
358 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
359 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
360 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
361 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
361 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
362 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
363 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
364 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
365 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
366 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
367 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
368 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
369 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
370 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
371 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
365 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
366 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
367 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
368 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
369 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
370 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
371 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
372 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
373 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
374 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
375 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
376 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
377 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
373 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
374 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
375 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
376 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
377 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
378 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
379 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
379 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
380 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
381 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
382 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
383 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
382 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
383 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
384 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
385 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
386 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
387 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
388 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
389 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
386 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
387 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
388 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
389 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
390 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
391 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
392 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
393 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
394 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
391 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
392 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
393 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
394 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
395 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
396 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
397 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
398 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
399 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
400 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
401 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
402 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
403 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
404 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
405 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
406 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
407 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
408 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
398 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
399 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
400 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
401 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
402 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
403 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
404 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
405 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
406 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
407 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
408 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
410 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
411 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
412 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
413 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
411 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
412 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
413 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
414 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
415 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
416 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
417 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
418 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
419 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
415 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
416 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
417 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
418 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
419 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
420 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
421 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
421 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
422 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
423 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
424 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
425 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
423 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
424 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
425 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
426 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
427 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
428 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
430 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
431 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
432 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
433 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
434 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
435 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
436 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
437 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
438 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
439 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
440 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
441 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
442 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
443 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
444 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
445 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
427 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
428 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
430 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
431 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
432 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
433 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
434 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
435 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
436 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
437 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
438 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
439 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
440 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
441 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
442 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
443 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
444 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
445 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
446 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
447 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
447 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
448 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
449 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
449 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
450 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
451 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
452 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
453 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
455 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
457 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
458 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
460 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
461 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
463 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
464 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
465 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
466 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
467 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
468 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
452 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
453 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
455 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
457 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
458 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
460 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
461 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
463 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
464 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
465 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
466 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
467 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
468 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
469 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
470 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
471 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
472 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
473 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
474 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
472 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
473 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
474 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
475 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
476 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
476 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
477 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
478 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
479 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
480 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
481 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
482 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
483 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
484 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
485 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
486 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
483 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
484 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
485 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
486 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
487 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
488 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
489 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
490 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
488 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
489 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
490 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
491 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
492 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
493 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -505,111 +505,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
505 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
506 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
507 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
508 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
509 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
510 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
511 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
508 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
509 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
510 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
511 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
512 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
513 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
514 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
515 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
517 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
513 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
514 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
515 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
517 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
518 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
519 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
519 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
520 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
521 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
522 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
523 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
524 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
523 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
524 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
525 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
526 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
527 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
528 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
528 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
529 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
530 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
531 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
532 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
533 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
534 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
535 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
535 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
536 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
537 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
538 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
539 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
540 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
541 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
542 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
543 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
544 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
537 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
538 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
539 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
540 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
541 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
542 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
543 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
544 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
545 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
546 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
547 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
547 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
548 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
549 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
549 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
550 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
551 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
552 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
553 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
554 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
555 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
556 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
557 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
558 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
551 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
552 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
553 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
554 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
555 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
556 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
557 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
558 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
559 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
560 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
561 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
562 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
563 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
564 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
565 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
561 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
562 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
563 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
564 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
565 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
566 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
567 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
568 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
569 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
570 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
571 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
572 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
573 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
574 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
575 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
576 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
577 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
578 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
579 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
580 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
581 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
582 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
567 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
568 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
569 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
570 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
571 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
572 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
573 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
574 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
575 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
576 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
577 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
578 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
579 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
580 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
581 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
582 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
583 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
584 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
585 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
586 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
587 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
588 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
589 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
584 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
585 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
586 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
587 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
588 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
589 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
590 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
591 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
592 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
593 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
592 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
593 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
594 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
595 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
595 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
596 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
597 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
598 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
599 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
600 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
601 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
602 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
597 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
598 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
599 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
600 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
601 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
602 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
603 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
604 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
605 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
606 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
604 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
605 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
606 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
607 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
608 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
609 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
610 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
611 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
612 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
612 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
613 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
614 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
615 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -620,20 +620,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
620 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
621 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
622 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
623 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
624 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
623 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
624 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
625 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
626 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
627 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
626 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
627 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
628 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
629 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
630 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
630 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
631 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
632 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
633 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
634 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
635 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
636 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
635 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
636 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
637 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
638 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
639 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -642,20 +642,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
642 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
643 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
644 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
645 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
645 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
646 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
647 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
648 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
649 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
650 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
651 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
652 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
654 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
655 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
650 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
651 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
652 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
654 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
655 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
656 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
657 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
658 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
657 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
658 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
659 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
660 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
661 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -679,17 +679,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
679 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
680 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
681 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
682 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
683 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
684 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
685 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
682 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
683 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
684 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
685 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
686 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
687 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
688 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
689 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
690 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
691 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
692 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
691 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
692 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
693 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
694 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
695 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -705,48 +705,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
705 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
706 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
707 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
708 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
708 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
709 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
710 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
711 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
712 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
713 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
714 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
715 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
715 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
716 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
717 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
718 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
719 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
719 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
720 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
721 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
721 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
722 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
723 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
724 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
724 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
725 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
726 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
727 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
728 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
729 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
730 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
731 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
732 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
729 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
730 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
731 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
732 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
733 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
734 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
735 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
736 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
737 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
738 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
738 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
739 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
740 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
741 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
742 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
740 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
741 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
742 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
743 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
744 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
745 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
746 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
746 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
747 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
748 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
749 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
748 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
749 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
750 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
751 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
752 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -754,119 +754,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
754 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
755 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
756 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
757 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
758 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
759 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
760 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
761 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
762 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
763 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
764 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
765 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
766 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
767 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
768 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
769 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
770 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
771 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
772 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
773 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
774 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
775 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
776 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
777 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
778 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
779 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
780 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
781 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
782 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
783 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
784 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
785 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
786 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
787 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
788 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
789 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
790 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
791 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
792 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
793 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
794 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
795 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
796 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
797 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
798 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
799 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
800 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
801 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
802 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
803 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
804 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
805 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
806 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
807 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
808 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
809 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
810 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
811 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
812 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
813 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
814 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
815 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
816 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
817 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
818 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
819 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
820 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
821 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
822 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
823 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
824 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
825 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
826 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
827 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
828 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
829 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
830 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
831 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
832 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
833 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
834 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
835 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
836 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
837 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
838 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
839 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
840 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
841 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
842 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
843 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
844 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
845 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
846 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
847 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
848 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
849 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
850 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
851 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
757 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
758 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
759 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
760 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
761 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
762 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
763 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
764 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
765 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
766 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
767 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
768 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
769 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
770 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
771 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
772 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
773 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
774 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
775 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
776 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
777 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
778 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
779 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
780 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
781 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
782 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
783 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
784 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
785 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
786 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
787 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
788 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
789 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
790 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
791 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
792 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
793 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
794 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
795 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
796 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
797 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
798 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
799 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
800 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
801 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
802 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
803 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
804 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
805 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
806 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
807 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
808 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
809 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
810 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
811 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
812 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
813 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
814 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
815 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
816 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
817 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
818 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
819 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
820 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
821 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
822 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
823 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
824 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
825 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
826 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
827 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
828 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
829 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
830 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
831 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
832 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
833 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
834 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
835 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
836 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
837 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
838 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
839 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
840 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
841 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
842 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
843 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
844 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
845 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
846 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
847 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
848 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
849 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
850 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
851 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
852 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
853 +l.Init();return l},ZLIB=ZLIB||{};
854 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
855 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
854 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
855 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
856 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
856 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
857 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
858 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
859 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
858 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
859 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
860 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
861 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
862 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
863 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
862 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
863 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
864 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
865 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
864 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
865 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
866 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
867 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
868 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
869 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
868 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
869 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
870 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
871 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
872 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
873 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
874 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -888,22 +890,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
890 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
891 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
892 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
891 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
892 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
893 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
894 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
895 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
893 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
894 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
895 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
896 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
897 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
898 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
899 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
900 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
901 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
902 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
901 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
902 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
903 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
904 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
905 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
904 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
905 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
906 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
906 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
907 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
908 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
909 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
910 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
911 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -919,16 +921,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
921 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
922 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
923 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
922 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
923 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
924 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
925 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
926 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
927 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
928 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
924 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
925 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
926 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
927 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
928 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
929 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
930 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
931 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
930 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
931 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Wird geladen...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
932 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
933 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Wird geladen...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
934 StatusStrs=["Getrennt","Anschlie\u00dfen ...","Installieren...","In Verbindung gebracht"],t,t2,rsepass=null;
935 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
936 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -962,14 +964,14 @@ var DMTFPowerStates=";;Ein;Leichter Schlaf;Tiefschlaf;Aus- und Wiedereinschalten
964 function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Unbekannt</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Ein"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
965 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Eingesteckt",", Batteriebetrieben"][v.PowerSource]);d+=TableEntry("Leistung",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Keiner</i>":EscapeHtml(c);d+=TableEntry("Name & Domain",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
966 d+=TableEntry("System ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("System ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" aktiviert im Admin Control Mode (ACM)",4==l.ProvisioningMode&&(n=" aktiviert im Client Control Mode (CCM)",b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,
965 -"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
966 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
967 -p&&(e+=", Umleitungsport");q&&(e+=", Serial-over-LAN");n&&(e+=", IDE-Redirect");h&&(e+=", KVM");""==e&&(e=" Keiner");d+=TableEntry("Aktive Funktionen",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Prim\u00e4re Anzeige",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Prim\u00e4re Anzeige","Sekund\u00e4ranzeige",
967 +"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
968 +p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
969 +q&&(e+=", Umleitungsport");p&&(e+=", Serial-over-LAN");n&&(e+=", IDE-Redirect");g&&(e+=", KVM");""==e&&(e=" Keiner");d+=TableEntry("Aktive Funktionen",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Prim\u00e4re Anzeige",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Prim\u00e4re Anzeige","Sekund\u00e4ranzeige",
970 "3. Anzeige"][n.DefaultScreen]),e='<span title="'+format("Die Standardfernanzeige ist {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Port 5900 aktiviert"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"Sekunden Opt-In":"zweite Anmeldung")),e+=","+n.SessionTimeout+" Minute"+(0<n.SessionTimeout?"s":"")+" Session-Timeout",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&
969 -1))&&(e+=", Ausblenden erlaubt"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Remotedesktop",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Unbekannter Zustand",p=amtsysstate.IPS_OptInService.response.OptInRequired,
970 -0==p&&(e="Nicht ben\u00f6tigt"),1==p&&(e="Nur f\u00fcr KVM erforderlich"),4294967295==p&&(e="Immer erforderlich"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Zustimmung des Benutzers",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Unbekannt",1:"Andere",2:"aktiviert",3:"Behindert",4:"Herunterfahren",5:"Unzutreffend",6:"Aktiviert aber offline",
971 +1))&&(e+=", Ausblenden erlaubt"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Remotedesktop",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Unbekannter Zustand",q=amtsysstate.IPS_OptInService.response.OptInRequired,
972 +0==q&&(e="Nicht ben\u00f6tigt"),1==q&&(e="Nur f\u00fcr KVM erforderlich"),4294967295==q&&(e="Immer erforderlich"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Zustimmung des Benutzers",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Unbekannt",1:"Andere",2:"aktiviert",3:"Behindert",4:"Herunterfahren",5:"Unzutreffend",6:"Aktiviert aber offline",
973 7:"Im Test",8:"Aufgeschoben",9:"Ruhe",10:"Beginnend",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Unbekannt",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=
972 -amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Energiepolitik",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',
974 +amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("Energiepolitik",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',
975 xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Terminzeit",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Machtaktionen ...","showPowerActionDlg()")+" ";e+=AddButton("Sicherer Staat...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
976 QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Das \u00c4ndern der Netzwerkeinstellungen kann dazu f\u00fchren, dass diese Seite nicht mehr verf\u00fcgbar ist.");d=d+"<br><h2>Allgemeine Einstellungen</h2>"+TableStart();e="";"<i>Keiner</i>"!=c&&(1==v.SharedFQDN&&(e=", mit dem Betriebssystem geteilt"),0==v.SharedFQDN&&(e=", anders als OS"));d+=TableEntry("Name & Domain",
977 addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="Behindert";1==v.DDNSUpdateEnabled?c="Jeweils aktiviert"+v.DDNSPeriodicUpdateInterval+" Minuten ist TTL"+v.DDNSTTL+" Protokoll":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Update per DHCP-Server");d+=TableEntry("Dynamisches DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||
@@ -978,8 +980,8 @@ e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Link-Richtlinie",addLin
980 s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Radio State",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Keiner</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
981 "aktiviert":"Behindert","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"aktiviert":"Behindert","showUefiWifiCoExDlg()",
982 xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Antworten Sie auf Ping",addLinkConditional(["Behindert","ICMP-Antwort","RMCP-Antwort","ICMP & RMCP Antwort"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Automatisch mit DHCP-Server":"Statische IP-Adresse",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4-Status",addLinkConditional(e,"showIPSetupDlg()",
981 -xxAccountAdminName)));d+=TableEntry("IPv4-Adresse",isIpAddress(c.IPAddress,"Keiner"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4-Gateway / Maske",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Keiner")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4-Domainnamenserver",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Behindert",w,e=amtsysstate.CIM_ElementSettingData.responses,
982 -B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Aktivierte, automatische und manuelle Adressen":"Aktiviert, Automatische Adressen");d+=TableEntry("IPv6-Status",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&
983 +xxAccountAdminName)));d+=TableEntry("IPv4-Adresse",isIpAddress(c.IPAddress,"Keiner"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4-Gateway / Maske",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Keiner")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4-Domainnamenserver",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="Behindert",w,e=amtsysstate.CIM_ElementSettingData.responses,
984 +B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Aktivierte, automatische und manuelle Adressen":"Aktiviert, Automatische Adressen");d+=TableEntry("IPv6-Status",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&
985 0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6-Adresse",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6-Adresse","Keiner");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6-Standardrouter",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=
986 c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6-Domainnamenserver",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}
987 function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
@@ -1028,8 +1030,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1030 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Behindert":"aktiviert",c&2&&(b+=", Gesperrt"),c&4&&(b+=", Fast voll"),c&8&&(b+=", Voll"),c&16&&(b+=", Kein Schl\u00fcssel"),c="<h1>\u00dcberwachungsprotokolleinstellungen</h1>"+TableStart(),c+=TableEntry("Zustand",b),c+=TableEntry("Lager",a[0].CurrentNumberOfRecords+" Aufzeichnungen),"+a[0].PercentageFree+"% kostenlos"),c+=TableEntry("Richtlinie \u00fcberschreiben",2==a[0].OverwritePolicy?"Wraps wenn voll":"\u00dcberschreibt nie"),
1031 c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1032 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Speichern...","SaveAuditLog()")+AddButton("Protokoll l\u00f6schen","ClearAuditLog()"))+"<br>");if(0==c.length)d="Es wurden keine \u00dcberwachungsprotokollereignisse gefunden.";else{var e=
1031 -0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Zeit</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+
1032 -a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1033 +0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Zeit</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+
1034 +a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1035 function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT Audit Log",auditLog)}function ClearAuditLog(b){QH(60,"\u00dcberwachungsprotokoll l\u00f6schen?");setDialogMode(1,"Audit-Log",3,ClearAuditLogEx)}
1036 function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Audit-Log","Error: "+d)}
1037 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Zeit",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiator",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adresse",a.NetAddress));d+=addHtmlValue("Anwendung",a.AuditApp);d+=addHtmlValue("Veranstaltung",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Erweiterte Daten",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=
@@ -1080,7 +1082,7 @@ function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabi
1082 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Unbekannt;Andere;aktiviert;Behindert;Herunterfahren;Unzutreffend;Aktiviert aber offline;Im Test;Aufgeschoben;Ruhe;Beginnend".split(";"),watchdogMonitoredEntity="Unbekannt;Andere;Betriebssystem;Startvorgang des Betriebssystems;Prozess zum Herunterfahren des Betriebssystems;Firmware-Startvorgang;BIOS-Startvorgang;Anwendung;Serviceprozessor".split(";");
1083 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Maximale Wachhunde",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" Aufpasser");b+=TableEntry("Maximale Gesamtaktionen",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" Aktionen");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie Intel&reg; AMT-Agenten-Anwesenheits-Watchdogs.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1084 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Kein Agent Presence Watchdog gefunden.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Aktion hinzuf\u00fcgen ..." onclick=addWatchdogAction(event,'+
1083 -c+")>";a.transitions&&(b+='<input type=button style=float:right value="Aktionen l\u00f6schen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=": Zu protokollierendes Ereignis")}""!=
1085 +c+")>";a.transitions&&(b+='<input type=button style=float:right value="Aktionen l\u00f6schen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Zu protokollierendes Ereignis")}""!=
1086 d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Watchdog hinzuf\u00fcgen ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Jeder Staat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1087 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Beschreibung",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u00dcberwachte Entit\u00e4t",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Aktuellen Zustand",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Aktivierter Status",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Startintervall",
1088 b.StartupInterval+" Sekunde (n)");c+=addHtmlValue("Timeout-Intervall",b.TimeoutInterval+" Sekunde (n)");setDialogMode(11,format("Wachhund {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1176,7 +1178,7 @@ a.AccessPermission){2==v&&(n+="Behindert,");var l=0;for(c in a.Realms)""!=amtsta
1178 xxAccountAdminName&&(c+=AddButton("Neues Konto","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1179 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Konto bearbeiten",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1180 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Neues Konto",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1179 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Kontofehler","Ung\u00fcltige Parameter");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1181 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Kontofehler","Ung\u00fcltige Parameter");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1182 l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1183 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrator</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1184 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Nur lokal","Nur Netzwerk","Alle (lokal & Netzwerk)"];
@@ -1194,8 +1196,8 @@ b+".txt")}delete terminal.m.capture;c3.value="Starten Sie die Erfassung"}}functi
1196 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1197 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1198 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1197 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1198 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1199 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1200 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1201 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("Datenkanal",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1202 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1203 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1206,14 +1208,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1208 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1209 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1210 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Verbinden":"Trennen";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Remotedesktop","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Remotedesktop","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?
1209 -messagebox("Remotedesktop","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1210 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Remotedesktopeinstellungen",3,showDesktopSettingsChanged))}
1211 +messagebox("Remotedesktop","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Remotedesktop","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=
1212 +amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1213 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Remotedesktopeinstellungen",3,showDesktopSettingsChanged))}
1214 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1215 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1213 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1214 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1215 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1216 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1216 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1217 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1218 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1219 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1220 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1221 "8px"),center()))}
1222 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Remote-Tastatureingabe",3,showDeskTypeEx,'<div>Geben Sie Text ein und klicken Sie auf OK, um ihn per Fernzugriff \u00fcber eine US-englische Tastatur einzugeben. Stellen Sie sicher, dass sich der Remote-Cursor an der richtigen Position befindet, bevor Sie fortfahren.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1224,13 +1227,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1227 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1228 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1229 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1227 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1230 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1231 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1232 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1233 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1231 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wurzel</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1232 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1233 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1234 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wurzel</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1235 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1236 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1237 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1238 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1239 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1353,10 +1356,9 @@ b&1&&addOption("d5actionSelect","Auf BIOS zur\u00fccksetzen",101));1==amtPowerBo
1356 401);addOption("d5actionSelect","Benutzerdefinierte Aktion ...",999);5<amtversion&&addOption("d5actionSelect","Zustimmung des Benutzers ...",998);setDialogMode(5,"Power-Aktionen",3,powerActionDlgCheck)}else messagebox("Power Action",format("Systemfunktionen k\u00f6nnen nicht abgerufen werden, Fehler {0}",d))}
1357 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"Power-Aktion abgeschlossen."):QH(60,format("Power Action Fehler # {0}.",e));setDialogMode(1,"Power Action",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Ausf\u00fchrung von Intel&reg; Remote Secure Erase best\u00e4tigen?<br>Geben Sie bei Bedarf das Kennwort zum sicheren L\u00f6schen ein.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Passwort</div></div><br><div style=color:red><b> WARNUNG: </ b> Dadurch werden Daten auf dem Remote-System gel\u00f6scht.</div>",
1358 rsepass=1,setDialogMode(11,"Power-Aktionen",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1356 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WARNUNG: </ b> Dadurch werden Daten auf dem Remote-System gel\u00f6scht.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1357 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1358 -a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Power-Aktionen",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1359 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1359 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WARNUNG: </ b> Dadurch werden Daten auf dem Remote-System gel\u00f6scht.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1360 +d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1361 +"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Power-Aktionen",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1362 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Power Action","Status pr\u00fcfen ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1363 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Power Action","Status pr\u00fcfen ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1364 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1390,10 +1392,10 @@ targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+
1392 function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1393 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1394 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1393 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1394 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie den Intel&reg; AMT-Speicher f\u00fcr diesen Computer.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1395 -" / "+p):e+"Wurzel";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Herunterladen","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" Bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1396 -q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Keine Dateien gefunden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1395 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1396 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Verwalten Sie den Intel&reg; AMT-Speicher f\u00fcr diesen Computer.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+
1397 +" / "+q):e+"Wurzel";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Herunterladen","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" Bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==
1398 +p&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Keine Dateien gefunden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1399 (v?AddButton("Hochladen...","UploadToStorage()"):""));QH(55,a)}else QH(55,"Speicherdaten k\u00f6nnen nicht geladen werden ...<br/>"+AddButton("Aktualisierung","PullStorage()"))}
1400 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Verk\u00e4ufer",b));""!=c&&(e+=addHtmlValue("Anwendung",c));e+=addHtmlValue("Name",a);e+=addHtmlValue("Gr\u00f6\u00dfe",v.size+" bytes");v.link&&(e+=addHtmlValue("Verkn\u00fcpfung",v.link));setDialogMode(11,"Aufbewahrungsgegenstand",5,showStorageDetailsEx,e,d)}}
1401 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("Lager",format("Datei kann nicht gel\u00f6scht werden (ERR {0}). \u00dcberpr\u00fcfen Sie, ob der Computer eingeschaltet ist.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}
@@ -1408,7 +1410,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1410 b}
1411 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1412 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1411 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," Tage").replace("H"," Std").replace("M"," Protokoll");b=b.replace(" 1 Tag"," 1 Tag").replace(" 1 Stunde"," 1 Stunde").replace(" 1 Minute"," 1 Minute");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1413 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," Tage").replace("H"," Std").replace("M"," Protokoll");b=b.replace(" 1 Tag"," 1 Tag").replace(" 1 Stunde"," 1 Stunde").replace(" 1 minute "," 1 Minute ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1414 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Weckalarme verwalten.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, wach auf "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," beim"),void 0!=d[c].Interval&&(a+=" und jede"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", l\u00f6schen, wenn Sie fertig sind"),
1415 b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Bearbeiten...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Es wurden keine Weckalarme registriert.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Entfernen Sie alle Alarme","RemoveAllAlarms()")+
1416 AddButton("Hinzuf\u00fcgen","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-es.htm
+620 -617
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="es" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Desconectado</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Estado del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Escritorio remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Archivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serie sobre LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Información de hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Registro de auditoría</a><p id=go21 class=nav1 onclick=go(21)><a>Almacenamiento</a><p id=go8 class=nav1 onclick=go(8)><a>Configuración de red</a><p id=go17 class=nav1 onclick=go(17)><a>Configuraciones de internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configuracion seguridad</a><p id=go19 class=nav1 onclick=go(19)><a>Presencia de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defensa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Cuentas de usuario</a><p id=go22 class=nav1 onclick=go(22)><a>Suscripciones</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Detener sesión IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquete, los bloques son 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, los bloques son 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>El firmware de esta computadora debe actualizarse,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aquí</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Cargando...</h1></div><div id=p1 style=display:none><h1>Estado del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Información de hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configuración de red</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Cuentas de usuario</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Consulta style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtrar style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal de serie sobre LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función Serial-over-LAN está deshabilitada<span id=26>, haga clic aquí para habilitarlo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Iniciar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alternar lo que enviará la tecla de retorno" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Cambiar tamaño de terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambiar el tipo de emulación de teclas F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii extendido" title="Cambiar el tipo de emulación de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retroceso<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pegar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Escritorio remoto</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función KVM están deshabilitados<span id=37>, haga clic aquí para habilitarlo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Girar a la izquierda" onclick=drotate(-1)>↺</div><div class=rb title="Gira a la derecha" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar el modo de pantalla completa" onkeypress="return false" onkeydown="return false" value=Completo onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Guardar una captura de pantalla del escritorio remoto" onkeypress="return false" onkeydown="return false" value=Salvar... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Configuraciones ..." title="Editar configuraciones de escritorio remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambiar el estado de energía de la máquina remota" onkeypress="return false" onkeydown="return false" value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Desconectado.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Izquierda<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Pantalla en blanco&nbsp;</span><span id=47><input id=48 type=checkbox>Sólo vista&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Registro de auditoría</h1><span id=50></span></div><div id=p16 style=display:none><h1>Configuracion seguridad</h1><span id=51></span></div><div id=p17 style=display:none><h1>Configuraciones de internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Defensa del sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presencia de agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Almacenamiento</h1><span id=55></span></div><div id=p22 style=display:none><h1>Suscripciones a eventos</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Archivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Arriba>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleccionar todo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rebautizar onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Eliminar onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nueva carpeta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Subir onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copiar onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pegar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Actualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordenar por nombre<option value=2>Ordenado por tamaño<option value=3>Ordenar por fecha<option value=4>Desciende por nombre<option value=5>Descender por tamaño<option value=6>Descender por fecha</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nombre de usuario</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Contraseña*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmar contraseña</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Red<option value=2>Ninguna</select><div>Permiso</div></div><div>Permisos concedidos</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Mínimo 8 caracteres con mayúsculas, minúsculas, 0-9 y uno de! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Acción de poder</div></div><div><span style=color:red>Advertencia:</span>Algunas acciones de energía pueden provocar la pérdida de datos y pueden desconectar las sesiones de redirección de escritorio, terminal o disco.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimiento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Pantalla principal<option value=1>Pantalla secundaria<option id=d6ThirdDisplay value=2 style=display:none>Tercera pantalla</select><div>Visualización de consentimiento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificación de imagen</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Mostrar cursor del mouse local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Supr</label><br><label><input type=checkbox id=d7limitFrameRate>Límite de velocidad de fotogramas</label><br><label><input type=checkbox id=d7noMouseRotate>No gire el mouse</label><br></div><div>Otros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Calidad</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Escalada</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administración style=float:right;width:220px><div style=height:20px>Nombre de usuario</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Contraseña</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Puerto de redireccionamiento</label><label id=c15 style=display:block><input type=checkbox id=c16>Escritorio remoto KVM</label><label style=display:block><input type=checkbox id=c17>Redirección IDE<br></label><label style=display:block><input type=checkbox id=c18>Serie sobre LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>No requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Requerido solo para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Siempre requerido<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">Nombre de perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridad</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>PSK WPA</select><div>Autenticación</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Ninguna</select><div>Cifrado</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Contraseña*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Confirmar contraseña</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Esto guardará todo el estado de Intel® AMT para esta máquina en un archivo. Las contraseñas no se guardarán, pero se pueden incluir algunos datos confidenciales.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Discapacitado<br><input type=radio name=d20 id=d20b value=1>Respuesta ICMP<br><input type=radio name=d20 id=d20c value=2>Respuesta RMCP<br><input type=radio name=d20 id=d20d value=3>Respuesta ICMP y RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronización de dirección IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>dirección IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de subred</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Puerta</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Discapacitado<option value=1>Desactivado, actualización de DHCP<option value=2>Habilitado</select><div>Cliente DNS dinámico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalo de actualización (minutos)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>El intervalo predeterminado es de 1440 minutos, el TTL predeterminado es de 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Encender<option value=10>Reiniciar<option value=5>Ciclo de poder<option value=8>Corriente cortada<option id=d24p500 value=500>OS Wake desde Standby<option id=d24p501 value=501>Ahorro de energía del sistema operativo<option value=999>Establecer opciones de arranque</select><div>Comando remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa del BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Hacer cumplir el arranque seguro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuración del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forzar eventos de progreso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Botón de encendido de bloqueo</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Botón de reinicio de bloqueo</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Botón de bloqueo</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloqueo de teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS bypass de contraseña</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo seguro</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serie sobre LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Borrado seguro remoto Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configuración de arranque</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Ninguna<option id=ForceDVDBootOption value=1>Forzar arranque de CD / DVD<option id=ForcePXEBootOption value=2>Arranque Force PXE<option id=ForceHDBootOption value=3>Forzar arranque de disco duro<option id=ForceDiagBootOption value=4>Arranque de diagnóstico de fuerza</select><div>Fuente de arranque</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Ninguna<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Arrancar en disquete<option value=1>Arrancar en CDROM</select><div>Dispositivo de arranque IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema por defecto<option id=c46 value=1>Tranquilo<option id=c47 value=2>Verboso<option id=c48 value=3>Pantalla en blanco</select><div>Verbocidad</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Contraseña RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nombre de alarma</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Fecha de activación (año-mes-día)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Tiempo de activación (hora: min: seg)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervalo (días-horas-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Mantener alarma<option value=1>Eliminar al finalizar</select></div><div style=padding-top:4px>Despues de despertar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Habilitado<br></label><label><input type=radio name=d26b id=c50 value=0>Discapacitado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Habilitado<br></label><label><input type=radio name=d26a id=c52 value=0>Discapacitado<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=Okay style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Eliminar style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="es" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Desconectado</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Estado del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Escritorio remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Archivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serie sobre LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Información de hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Registro de auditoría</a><p id=go21 class=nav1 onclick=go(21)><a>Almacenamiento</a><p id=go8 class=nav1 onclick=go(8)><a>Configuración de red</a><p id=go17 class=nav1 onclick=go(17)><a>Configuraciones de internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configuracion seguridad</a><p id=go19 class=nav1 onclick=go(19)><a>Presencia de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defensa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Cuentas de usuario</a><p id=go22 class=nav1 onclick=go(22)><a>Suscripciones</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Detener sesión IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquete, los bloques son 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, los bloques son 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>El firmware de esta computadora debe actualizarse,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aquí</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Cargando...</h1></div><div id=p1 style=display:none><h1>Estado del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Información de hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configuración de red</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Cuentas de usuario</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Consulta style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtrar style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal de serie sobre LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función Serial-over-LAN está deshabilitada<span id=26>, haga clic aquí para habilitarlo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Iniciar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alternar lo que enviará la tecla de retorno" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Cambiar tamaño de terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambiar el tipo de emulación de teclas F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii extendido" title="Cambiar el tipo de emulación de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retroceso<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pegar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Escritorio remoto</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>El puerto Intel® AMT Redirection o la función KVM están deshabilitados<span id=37>, haga clic aquí para habilitarlo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La computadora remota no está encendida, haga clic aquí para emitir un comando de encendido.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Girar a la izquierda" onclick=drotate(-1)>↺</div><div class=rb title="Gira a la derecha" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar el modo de pantalla completa" onkeypress="return false" onkeydown="return false" value=Completo onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Guardar una captura de pantalla del escritorio remoto" onkeypress="return false" onkeydown="return false" value=Salvar... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Configuraciones ..." title="Editar configuraciones de escritorio remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar la operación remota de montaje en disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambiar el estado de energía de la máquina remota" onkeypress="return false" onkeydown="return false" value="Acciones de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Desconectado.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Izquierda<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Pantalla en blanco&nbsp;</span><span id=47><input id=48 type=checkbox>Sólo vista&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Registro de auditoría</h1><span id=50></span></div><div id=p16 style=display:none><h1>Configuracion seguridad</h1><span id=51></span></div><div id=p17 style=display:none><h1>Configuraciones de internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Defensa del sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presencia de agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Almacenamiento</h1><span id=55></span></div><div id=p22 style=display:none><h1>Suscripciones a eventos</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Archivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Arriba>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleccionar todo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rebautizar onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Eliminar onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nueva carpeta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Subir onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copiar onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pegar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Actualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordenar por nombre<option value=2>Ordenado por tamaño<option value=3>Ordenar por fecha<option value=4>Desciende por nombre<option value=5>Descender por tamaño<option value=6>Descender por fecha</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nombre de usuario</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Contraseña*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmar contraseña</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Red<option value=2>Ninguna</select><div>Permiso</div></div><div>Permisos concedidos</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Mínimo 8 caracteres con mayúsculas, minúsculas, 0-9 y uno de! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Acción de poder</div></div><div><span style=color:red>Advertencia:</span>Algunas acciones de energía pueden provocar la pérdida de datos y pueden desconectar las sesiones de redirección de escritorio, terminal o disco.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimiento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Pantalla principal<option value=1>Pantalla secundaria<option id=d6ThirdDisplay value=2 style=display:none>Tercera pantalla</select><div>Visualización de consentimiento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificación de imagen</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Discapacitado<option value=2>Automatic<option value=3>Habilitado</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostrar cursor del mouse local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Supr</label><br><label><input type=checkbox id=d7limitFrameRate>Límite de velocidad de fotogramas</label><br><label><input type=checkbox id=d7noMouseRotate>No gire el mouse</label><br></div><div>Otros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Calidad</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Escalada</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administración style=float:right;width:220px><div style=height:20px>Nombre de usuario</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Contraseña</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Puerto de redireccionamiento</label><label id=c15 style=display:block><input type=checkbox id=c16>Escritorio remoto KVM</label><label style=display:block><input type=checkbox id=c17>Redirección IDE<br></label><label style=display:block><input type=checkbox id=c18>Serie sobre LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>No requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Requerido solo para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Siempre requerido<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">Nombre de perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo 32 caracteres"><div title="Máximo 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridad</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>PSK WPA</select><div>Autenticación</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Ninguna</select><div>Cifrado</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Contraseña*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longitud entre 8 y 63 caracteres."><div title="Longitud entre 8 y 63 caracteres.">Confirmar contraseña</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Esto guardará todo el estado de Intel® AMT para esta máquina en un archivo. Las contraseñas no se guardarán, pero se pueden incluir algunos datos confidenciales.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Discapacitado<br><input type=radio name=d20 id=d20b value=1>Respuesta ICMP<br><input type=radio name=d20 id=d20c value=2>Respuesta RMCP<br><input type=radio name=d20 id=d20d value=3>Respuesta ICMP y RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronización de dirección IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>dirección IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de subred</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Puerta</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Discapacitado<option value=1>Desactivado, actualización de DHCP<option value=2>Habilitado</select><div>Cliente DNS dinámico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalo de actualización (minutos)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>El intervalo predeterminado es de 1440 minutos, el TTL predeterminado es de 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Encender<option value=10>Reiniciar<option value=5>Ciclo de poder<option value=8>Corriente cortada<option id=d24p500 value=500>OS Wake desde Standby<option id=d24p501 value=501>Ahorro de energía del sistema operativo<option value=999>Establecer opciones de arranque</select><div>Comando remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa del BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Hacer cumplir el arranque seguro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuración del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forzar eventos de progreso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Botón de encendido de bloqueo</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Botón de reinicio de bloqueo</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Botón de bloqueo</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloqueo de teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS bypass de contraseña</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo seguro</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serie sobre LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Borrado seguro remoto Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configuración de arranque</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Ninguna<option id=ForceDVDBootOption value=1>Forzar arranque de CD / DVD<option id=ForcePXEBootOption value=2>Arranque Force PXE<option id=ForceHDBootOption value=3>Forzar arranque de disco duro<option id=ForceDiagBootOption value=4>Arranque de diagnóstico de fuerza</select><div>Fuente de arranque</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Ninguna<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Arrancar en disquete<option value=1>Arrancar en CDROM</select><div>Dispositivo de arranque IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema por defecto<option id=c46 value=1>Tranquilo<option id=c47 value=2>Verboso<option id=c48 value=3>Pantalla en blanco</select><div>Verbocidad</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Contraseña RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nombre de alarma</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Fecha de activación (año-mes-día)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Tiempo de activación (hora: min: seg)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervalo (días-horas-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Mantener alarma<option value=1>Eliminar al finalizar</select></div><div style=padding-top:4px>Despues de despertar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Habilitado<br></label><label><input type=radio name=d26b id=c50 value=0>Discapacitado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Habilitado<br></label><label><input type=radio name=d26a id=c52 value=0>Discapacitado<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=Okay style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Eliminar style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,176 +12,177 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Datos inv\u00e1lidos";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Datos inv\u00e1lidos";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"Agente de vigilancia"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiado a"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusi\u00f3n de casos";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota Serial Over LAN.";if(1==c[2])return"Sesi\u00f3n remota serie en LAN finalizada. Se restableci\u00f3 el control del usuario.";if(2==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota de redirecci\u00f3n de IDE.";
93 +a&&170==c[0])return"Agente de vigilancia"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiado a"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusi\u00f3n de casos";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota Serial Over LAN.";if(1==c[2])return"Sesi\u00f3n remota serie en LAN finalizada. Se restableci\u00f3 el control del usuario.";if(2==c[2])return"Se estableci\u00f3 una sesi\u00f3n remota de redirecci\u00f3n de IDE.";
94 if(3==c[2])return"Sesi\u00f3n remota de redirecci\u00f3n de IDE finalizada. Se restableci\u00f3 el control del usuario."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="cableado"),4294967293==a?"Todos los filtros de paquetes recibidos coinciden"+b+" interfaz.":4294967292==a?"Todos los filtros de paquetes salientes coincidieron con"+b+" interfaz.":4294967290==a?"El filtro de paquetes falsificado se hizo coincidir"+b+" interfaz.":"Filtrar"+a+" fue emparejado en"+b+" interfaz.";
95 if(192==a)return 0==c[2]?"Pol\u00edtica de seguridad invocada. Se detuvo parte o todo el tr\u00e1fico de red (TX).":2==c[2]?"Pol\u00edtica de seguridad invocada. Se detuvo parte o todo el tr\u00e1fico de red (RX).":"Pol\u00edtica de seguridad invocada.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Solicitud del usuario para conexi\u00f3n remota.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Error de EAC: intente obtener una postura mientras NAC en Intel\u00ae AMT est\u00e1 desactivado.";
96 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Error de HWA: error general"}return 6==a?"Autenticaci\u00f3n fallida"+(c[1]+(c[2]<<8))+" veces. El sistema puede estar bajo ataque.":30==a?"No hay medios de arranque":32==a?"Bloqueo del sistema operativo o interrupci\u00f3n de energ\u00eda":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Falla de arranque del sistema":37==a?"Se inici\u00f3 el firmware del sistema (al menos una CPU se est\u00e1 ejecutando correctamente).":"Tipo de sensor desconocido #"+
97 -a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),
98 -b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>Puerto predeterminado de KVM</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);
99 -b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=
100 -function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,
101 -p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=
102 -function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&
103 -(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=
104 -function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
108 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
110 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
111 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
112 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
113 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
115 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
116 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
118 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
120 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
121 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
122 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
123 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
125 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
127 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
128 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
130 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
133 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
134 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
135 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
137 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
138 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
139 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
142 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
143 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
144 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
145 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
148 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
149 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
150 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
97 +a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
98 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Puerto predeterminado de KVM</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);
99 +b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=
100 +function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,
101 +q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=
102 +function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&
103 +(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=
104 +function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
108 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
110 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
111 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
112 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
113 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
115 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
116 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
118 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
120 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
121 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
122 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
123 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
125 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
127 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
128 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
130 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
133 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
134 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
135 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
137 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
138 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
139 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
140 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
142 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
143 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
144 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
145 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
148 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
149 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
150 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
152 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
153 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
154 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
155 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
156 -[a,b,[]])};var E="Sin especificar. No hay memoria del sistema instalada f\u00edsicamente en el sistema. No hay memoria utilizable del sistema, toda la memoria instalada ha experimentado una falla irrecuperable. Falla irrecuperable del disco duro / dispositivo ATAPI / IDE. Falla irrecuperable de la placa del sistema. falla del subsistema. ; Falla irrecuperable del controlador del disco duro. ; Falla irrecuperable del teclado PS / 2 o USB. ; No se encontr\u00f3 el medio de arranque extra\u00edble. ; Falla irrecuperable del controlador de video. ; No se detect\u00f3 ning\u00fan dispositivo de video. ; Se detect\u00f3 corrupci\u00f3n de ROM del firmware (BIOS). ; Falta de coincidencia de voltaje de la CPU (los procesadores que comparten el mismo suministro tienen requisitos de voltaje no coincidentes)".split(";"),
157 -m="Sin especificar. ; Inicializaci\u00f3n de memoria. ; Inicio de inicializaci\u00f3n y prueba de disco duro ; Inicializaci\u00f3n de procesador (es) secundario (s) ; Autenticaci\u00f3n de usuario ; Configuraci\u00f3n del sistema iniciada por el usuario ; Configuraci\u00f3n de recursos USB ; Configuraci\u00f3n de recursos PCI ; Inicializaci\u00f3n de ROM opcional ; Inicializaci\u00f3n de cach\u00e9 ; SM inicializaci\u00f3n Inicializaci\u00f3n del bus ; Inicializaci\u00f3n del controlador del teclado ; Inicializaci\u00f3n del controlador integrado / controlador de gesti\u00f3n ; Conexi\u00f3n de la estaci\u00f3n de acoplamiento ; Habilitaci\u00f3n de la estaci\u00f3n de acoplamiento ; Expulsi\u00f3n de la estaci\u00f3n de acoplamiento ; Inhabilitaci\u00f3n de la estaci\u00f3n de acoplamiento ; Llamada del vector de activaci\u00f3n del sistema operativo ; Inicio del proceso de arranque del sistema operativo ; Inicializaci\u00f3n de la placa base o placa base ; reservado ; Inicializaci\u00f3n de disquete ; Prueba de teclado ; Prueba de dispositivo se\u00f1alador ; Inicializaci\u00f3n del procesador primario".split(";"),
155 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
156 +[a,b,[]])};var D="Sin especificar. No hay memoria del sistema instalada f\u00edsicamente en el sistema. No hay memoria utilizable del sistema, toda la memoria instalada ha experimentado una falla irrecuperable. Falla irrecuperable del disco duro / dispositivo ATAPI / IDE. Falla irrecuperable de la placa del sistema. falla del subsistema. ; Falla irrecuperable del controlador del disco duro. ; Falla irrecuperable del teclado PS / 2 o USB. ; No se encontr\u00f3 el medio de arranque extra\u00edble. ; Falla irrecuperable del controlador de video. ; No se detect\u00f3 ning\u00fan dispositivo de video. ; Se detect\u00f3 corrupci\u00f3n de ROM del firmware (BIOS). ; Falta de coincidencia de voltaje de la CPU (los procesadores que comparten el mismo suministro tienen requisitos de voltaje no coincidentes)".split(";"),
157 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
158 k="Sin especificar ; Otro ; Desconocido ; Procesador ; Disco ; Perif\u00e9rico ; M\u00f3dulo de gesti\u00f3n del sistema ; Placa del sistema ; M\u00f3dulo de memoria ; M\u00f3dulo del procesador ; Fuente de alimentaci\u00f3n ; Agregar tarjeta ; Placa del panel frontal ; Placa del panel posterior ; Placa del sistema de alimentaci\u00f3n ; Placa posterior de la unidad ; Expansi\u00f3n interna del sistema placa ; Otra placa del sistema ; Placa del procesador ; Unidad de potencia ; M\u00f3dulo de potencia ; Placa de administraci\u00f3n de energ\u00eda ; Placa del panel posterior del chasis ; Chasis del sistema ; Chasis secundario ; Otra placa del chasis ; Compartimento de la unidad de disco ; Compartimento perif\u00e9rico ; Compartimento del dispositivo ; Refrigeraci\u00f3n del ventilador ; Unidad de refrigeraci\u00f3n ; Interconexi\u00f3n de cables ; Dispositivo de memoria ; Software de gesti\u00f3n del sistema ; BIOS ; Intel (r) ME ; Bus del sistema ; Grupo ; Intel (r) ME ; Entorno externo ; Bater\u00eda ; Blade de procesamiento ; Interruptor de conectividad ; M\u00f3dulo de procesador / memoria ; M\u00f3dulo de E / S ; M\u00f3dulo de E / S del procesador ; Firmware del controlador de gesti\u00f3n ; Canal IPMI ; Bus PCI ; Bus PCI express ; Bus SCSI ; Bus SATA / SAS ; Bus frontal del procesador".split(";");
159 -h.RealmNames=";; Redirecci\u00f3n ;; Activo de hardware ; Control remoto ; Almacenamiento ; Administrador de eventos ; Administrador de almacenamiento ; Presencia de agente local ; Presencia de agente remoto ; Disyuntor ; Tiempo de red ; Informaci\u00f3n general ; Actualizaci\u00f3n de firmware ; EIT ; LocalUN ; Control de acceso de punto final ; Control de acceso de punto final Admin ; Lector de registro de eventos ; Registro de auditor\u00eda ; Reino ACL ;;; Sistema local".split(";");h.WatchdogCurrentStates=
160 -{1:"No empezado",2:"Detenido",4:"Corriendo",8:"Caducado",16:"Suspendido"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
161 -O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"Administrador de seguridad",17:"RCO",18:"Gerente de redireccionamiento",19:"Administrador de actualizaci\u00f3n de firmware",20:"Registro de auditor\u00eda de seguridad",21:"Tiempo de red",22:"Administraci\u00f3n de red",23:"Administraci\u00f3n de almacenamiento",24:"Administrador de evento",25:"Gerente de disyuntores",26:"Gerente de presencia de agente",27:"Configuraci\u00f3n inal\u00e1mbrica",28:"EAC",29:"KVM",30:"Eventos de aceptaci\u00f3n del usuario",
159 +g.RealmNames=";; Redirecci\u00f3n ;; Activo de hardware ; Control remoto ; Almacenamiento ; Administrador de eventos ; Administrador de almacenamiento ; Presencia de agente local ; Presencia de agente remoto ; Disyuntor ; Tiempo de red ; Informaci\u00f3n general ; Actualizaci\u00f3n de firmware ; EIT ; LocalUN ; Control de acceso de punto final ; Control de acceso de punto final Admin ; Lector de registro de eventos ; Registro de auditor\u00eda ; Reino ACL ;;; Sistema local".split(";");g.WatchdogCurrentStates=
160 +{1:"No empezado",2:"Detenido",4:"Corriendo",8:"Caducado",16:"Suspendido"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
161 +O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"Administrador de seguridad",17:"RCO",18:"Gerente de redireccionamiento",19:"Administrador de actualizaci\u00f3n de firmware",20:"Registro de auditor\u00eda de seguridad",21:"Tiempo de red",22:"Administraci\u00f3n de red",23:"Administraci\u00f3n de almacenamiento",24:"Administrador de evento",25:"Gerente de disyuntores",26:"Gerente de presencia de agente",27:"Configuraci\u00f3n inal\u00e1mbrica",28:"EAC",29:"KVM",30:"Eventos de aceptaci\u00f3n del usuario",
162 32:"Pantalla en blanco",33:"Eventos de vigilancia",1600:"Aprovisionamiento iniciado",1601:"Aprovisionamiento completado",1602:"Entrada de ACL agregada",1603:"Entrada de ACL modificada",1604:"Entrada de ACL eliminada",1605:"Acceso a ACL con credenciales no v\u00e1lidas",1606:"Estado de entrada de ACL",1607:"Estado de TLS cambiado",1608:"Conjunto de certificados de servidor TLS",1609:"Certificado de servidor TLS Eliminar",1610:"Certificado TLS Trusted Root agregado",1611:"Certificado ra\u00edz de confianza TLS eliminado",
163 1612:"Juego de llaves TLS previamente compartidas",1613:"Configuraci\u00f3n de Kerberos modificada",1614:"Clave principal de Kerberos modificada",1615:"Restablecimiento de contadores de desgaste de flash",1616:"Paquete de energ\u00eda modificado",1617:"Establecer modo de autenticaci\u00f3n de reino",1618:"Actualizar cliente al modo de control de administrador",1619:"Desaprovisionamiento iniciado",1700:"Encendido realizado",1701:"Apagado realizado",1702:"Ciclo de energ\u00eda realizado",1703:"Reinicio realizado",
164 -1704:"Establecer opciones de arranque",1800:"Sesi\u00f3n IDER abierta",1801:"Sesi\u00f3n IDER cerrada",1802:"IDER habilitado",1803:"IDER deshabilitado",1804:"Sesi\u00f3n de SoL abierta",1805:"Sesi\u00f3n de SoL cerrada",1806:"SoL habilitado",1807:"SoL deshabilitado",1808:"Sesi\u00f3n KVM iniciada",1809:"Sesi\u00f3n KVM finalizada",1810:"KVM habilitado",1811:"KVM deshabilitado",1812:"La contrase\u00f1a de VNC fall\u00f3 3 veces",1900:"Firmware actualizado",1901:"Error de actualizaci\u00f3n de firmware",
165 -2E3:"Registro de auditor\u00eda de seguridad borrado",2001:"Pol\u00edtica de auditor\u00eda de seguridad modificada",2002:"Registro de auditor\u00eda de seguridad deshabilitado",2003:"Registro de auditor\u00eda de seguridad habilitado",2004:"Registro de auditor\u00eda de seguridad exportado",2005:"Registro de auditor\u00eda de seguridad recuperado",2100:"Intel&reg; ME Time Set",2200:"Conjunto de par\u00e1metros TCPIP",2201:"Conjunto de nombres de host",2202:"Conjunto de nombres de dominio",2203:"Conjunto de par\u00e1metros de VLAN",
166 -2204:"Conjunto de pol\u00edticas de enlace",2205:"Conjunto de par\u00e1metros de IPv6",2300:"Conjunto de atributos de almacenamiento global",2301:"Almacenamiento EACL modificado",2302:"Almacenamiento FPACL modificado",2303:"Operaci\u00f3n de escritura de almacenamiento",2400:"Alerta suscrita",2401:"Alerta sin suscripci\u00f3n",2402:"Registro de eventos borrado",2403:"Registro de eventos congelado",2500:"Filtro CB agregado",2501:"Filtro CB eliminado",2502:"Pol\u00edtica de CB agregada",2503:"Pol\u00edtica de CB eliminada",
167 -2504:"Conjunto de pol\u00edticas predeterminadas de CB",2505:"Conjunto de opciones de heur\u00edstica CB",2506:"Estado de heur\u00edstica de CB aprobado",2600:"Agente de vigilancia agregado",2601:"Agente de vigilancia eliminado",2602:"Conjunto de acciones del agente de vigilancia",2700:"Perfil inal\u00e1mbrico agregado",2701:"Perfil inal\u00e1mbrico eliminado",2702:"Perfil inal\u00e1mbrico actualizado",2800:"EAC Posture Signer SET",2801:"EAC habilitado",2802:"EAC deshabilitado",2803:"Estado de postura de EAC",
168 -2804:"Opciones de configuraci\u00f3n de EAC",2900:"Opci\u00f3n KVM habilitada",2901:"Opci\u00f3n KVM desactivada",2902:"Contrase\u00f1a KVM modificada",2903:"Consentimiento de KVM exitoso",2904:"Consentimiento de KVM fallido",3E3:"Cambio de pol\u00edtica de aceptaci\u00f3n",3001:"Enviar evento de c\u00f3digo de consentimiento",3002:"Iniciar evento bloqueado de aceptaci\u00f3n"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));
169 -if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acceso inv\u00e1lido a m\u00ed","Acceso no v\u00e1lido a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["Discapacitado","Habilitado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+","+["NoAuth","Autenticaci\u00f3n","Discapacitado"][b.charCodeAt(4)]:
164 +1704:"Establecer opciones de arranque",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"Sesi\u00f3n IDER abierta",1801:"Sesi\u00f3n IDER cerrada",1802:"IDER habilitado",1803:"IDER deshabilitado",1804:"Sesi\u00f3n de SoL abierta",1805:"Sesi\u00f3n de SoL cerrada",1806:"SoL habilitado",1807:"SoL deshabilitado",1808:"Sesi\u00f3n KVM iniciada",1809:"Sesi\u00f3n KVM finalizada",
165 +1810:"KVM habilitado",1811:"KVM deshabilitado",1812:"La contrase\u00f1a de VNC fall\u00f3 3 veces",1900:"Firmware actualizado",1901:"Error de actualizaci\u00f3n de firmware",2E3:"Registro de auditor\u00eda de seguridad borrado",2001:"Pol\u00edtica de auditor\u00eda de seguridad modificada",2002:"Registro de auditor\u00eda de seguridad deshabilitado",2003:"Registro de auditor\u00eda de seguridad habilitado",2004:"Registro de auditor\u00eda de seguridad exportado",2005:"Registro de auditor\u00eda de seguridad recuperado",
166 +2100:"Intel&reg; ME Time Set",2200:"Conjunto de par\u00e1metros TCPIP",2201:"Conjunto de nombres de host",2202:"Conjunto de nombres de dominio",2203:"Conjunto de par\u00e1metros de VLAN",2204:"Conjunto de pol\u00edticas de enlace",2205:"Conjunto de par\u00e1metros de IPv6",2300:"Conjunto de atributos de almacenamiento global",2301:"Almacenamiento EACL modificado",2302:"Almacenamiento FPACL modificado",2303:"Operaci\u00f3n de escritura de almacenamiento",2400:"Alerta suscrita",2401:"Alerta sin suscripci\u00f3n",
167 +2402:"Registro de eventos borrado",2403:"Registro de eventos congelado",2500:"Filtro CB agregado",2501:"Filtro CB eliminado",2502:"Pol\u00edtica de CB agregada",2503:"Pol\u00edtica de CB eliminada",2504:"Conjunto de pol\u00edticas predeterminadas de CB",2505:"Conjunto de opciones de heur\u00edstica CB",2506:"Estado de heur\u00edstica de CB aprobado",2600:"Agente de vigilancia agregado",2601:"Agente de vigilancia eliminado",2602:"Conjunto de acciones del agente de vigilancia",2700:"Perfil inal\u00e1mbrico agregado",
168 +2701:"Perfil inal\u00e1mbrico eliminado",2702:"Perfil inal\u00e1mbrico actualizado",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC habilitado",2802:"EAC deshabilitado",2803:"Estado de postura de EAC",2804:"Opciones de configuraci\u00f3n de EAC",2900:"Opci\u00f3n KVM habilitada",2901:"Opci\u00f3n KVM desactivada",2902:"Contrase\u00f1a KVM modificada",
169 +2903:"Consentimiento de KVM exitoso",2904:"Consentimiento de KVM fallido",3E3:"Cambio de pol\u00edtica de aceptaci\u00f3n",3001:"Enviar evento de c\u00f3digo de consentimiento",3002:"Iniciar evento bloqueado de aceptaci\u00f3n",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));
170 +if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acceso inv\u00e1lido a m\u00ed","Acceso no v\u00e1lido a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["Discapacitado","Habilitado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Autenticaci\u00f3n","Discapacitado"][b.charCodeAt(4)]:
171 1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN remota"][b.charCodeAt(0)]:1900==a?"Desde"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" a"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Desde"+["Ninguna","KVM","Todas"][b.charCodeAt(0)]+" a"+["Ninguna","KVM","Todas"][b.charCodeAt(1)]:3001==a?["\u00c9xito","Fall\u00f3 3 veces"][b.charCodeAt(0)]:
171 -null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
172 +null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
173 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
174 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
175 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
176 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
176 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
177 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
178 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
179 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
180 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
181 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
182 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
183 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
184 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
177 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
178 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
179 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
180 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
181 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
182 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
183 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
184 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
185 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
186 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
187 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
188 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -192,10 +193,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
193 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
194 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
195 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
195 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
196 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
197 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
197 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
198 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
198 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
199 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
200 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
201 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
202 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -205,69 +206,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
206 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
207 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
208 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
208 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
209 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
210 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
211 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
212 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
213 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
214 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
215 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
209 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
210 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
211 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
212 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
213 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
214 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
215 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
216 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
217 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
217 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
218 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
219 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
220 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
221 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
222 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
223 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
224 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
225 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
226 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
227 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
228 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
229 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
230 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
218 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
219 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
220 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
221 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
222 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
223 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
224 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
225 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
226 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
227 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
228 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
229 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
230 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
231 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
232 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
233 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
234 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
235 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
235 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
236 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
237 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
236 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
237 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
238 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
239 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
240 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
241 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
242 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
243 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
243 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
244 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
245 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
246 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
247 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
248 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
249 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
250 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
244 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
245 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
246 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
247 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
248 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
249 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
250 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
251 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
252 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
253 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
254 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
254 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
255 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
256 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
257 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
258 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
259 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
260 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
261 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
262 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
263 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
264 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
265 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
266 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
255 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
256 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
257 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
258 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
259 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
260 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
261 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
262 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
263 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
264 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
265 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
266 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
267 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
268 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
268 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
269 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
270 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
269 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
270 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
271 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
272 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
273 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
274 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -281,213 +282,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
282 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
283 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
284 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
284 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
285 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
286 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
286 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
287 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
288 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
289 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
290 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
291 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
292 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
293 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
287 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
288 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
289 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
290 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
291 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
292 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
293 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
294 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
295 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
295 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
296 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
297 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
296 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
297 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
298 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
299 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
300 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
300 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
301 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
302 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
302 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
303 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
304 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
304 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
305 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
306 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
307 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
308 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
309 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
310 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
311 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
312 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
313 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
314 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
315 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
316 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
305 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
306 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
307 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
308 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
309 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
310 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
311 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
312 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
313 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
314 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
315 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
316 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
317 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
318 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
318 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
319 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
320 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
321 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
322 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
323 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
324 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
325 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
326 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
319 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
320 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
321 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
322 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
323 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
324 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
325 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
326 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
327 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
328 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
329 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
330 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
331 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
332 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
333 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
333 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
334 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
335 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
336 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
337 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
338 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
334 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
335 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
336 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
337 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
338 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
339 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
340 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
340 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
341 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
342 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
342 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
343 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
344 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
345 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
346 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
347 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
348 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
349 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
350 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
351 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
343 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
344 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
345 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
346 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
347 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
348 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
349 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
350 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
351 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
352 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
353 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
353 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
354 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
355 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
356 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
357 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
354 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
355 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
356 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
357 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
358 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
359 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
360 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
361 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
361 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
362 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
363 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
364 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
365 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
365 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
366 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
367 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
368 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
369 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
370 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
371 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
366 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
367 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
368 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
369 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
370 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
371 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
372 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
373 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
373 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
374 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
375 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
376 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
377 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
374 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
375 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
376 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
377 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
378 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
379 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
379 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
380 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
381 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
382 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
382 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
383 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
383 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
384 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
385 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
386 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
386 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
387 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
388 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
389 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
387 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
388 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
389 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
390 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
391 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
391 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
392 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
393 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
394 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
392 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
393 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
394 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
395 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
396 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
397 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
398 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
398 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
399 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
400 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
401 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
402 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
403 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
404 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
405 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
406 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
407 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
408 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
399 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
400 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
401 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
402 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
403 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
404 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
405 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
406 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
407 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
408 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
409 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
410 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
411 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
411 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
412 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
413 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
412 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
413 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
414 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
415 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
415 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
416 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
417 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
418 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
419 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
416 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
417 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
418 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
419 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
420 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
421 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
421 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
422 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
423 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
423 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
424 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
425 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
424 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
425 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
426 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
427 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
427 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
428 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
430 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
431 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
432 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
433 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
434 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
435 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
436 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
437 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
438 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
439 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
440 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
441 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
442 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
443 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
444 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
445 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
428 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
429 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
430 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
431 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
432 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
433 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
434 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
435 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
436 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
437 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
438 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
439 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
440 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
441 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
442 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
443 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
444 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
445 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
446 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
447 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
447 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
448 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
449 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
449 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
450 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
451 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
452 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
452 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
453 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
455 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
457 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
458 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
460 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
461 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
463 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
464 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
465 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
466 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
467 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
468 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
453 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
454 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
455 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
456 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
457 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
458 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
459 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
460 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
461 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
462 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
463 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
464 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
465 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
466 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
467 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
468 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
469 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
470 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
471 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
472 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
472 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
473 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
474 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
473 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
474 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
475 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
476 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
476 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
477 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
478 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
479 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
480 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
481 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
482 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
483 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
483 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
484 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
485 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
486 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
484 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
485 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
486 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
487 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
488 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
488 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
489 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
490 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
489 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
490 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
491 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
492 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
493 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
494 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -505,111 +506,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
506 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
507 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
508 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
508 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
509 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
510 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
511 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
509 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
510 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
511 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
512 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
513 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
513 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
514 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
515 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
517 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
514 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
515 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
516 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
517 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
518 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
519 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
519 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
520 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
521 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
522 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
523 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
523 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
524 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
524 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
525 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
526 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
527 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
528 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
528 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
529 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
530 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
531 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
532 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
533 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
534 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
535 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
535 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
536 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
537 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
537 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
538 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
539 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
540 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
541 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
542 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
543 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
544 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
538 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
539 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
540 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
541 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
542 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
543 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
544 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
545 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
546 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
547 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
547 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
548 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
549 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
549 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
550 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
551 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
551 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
552 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
553 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
554 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
555 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
556 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
557 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
558 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
552 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
553 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
554 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
555 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
556 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
557 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
558 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
559 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
560 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
561 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
561 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
562 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
563 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
564 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
565 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
562 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
563 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
564 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
565 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
566 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
567 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
567 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
568 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
569 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
570 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
571 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
572 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
573 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
574 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
575 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
576 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
577 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
578 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
579 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
580 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
581 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
582 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
568 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
569 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
570 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
571 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
572 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
573 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
574 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
575 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
576 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
577 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
578 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
579 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
580 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
581 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
582 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
583 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
584 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
584 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
585 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
586 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
587 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
588 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
589 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
585 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
586 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
587 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
588 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
589 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
590 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
591 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
592 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
592 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
593 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
593 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
594 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
595 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
595 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
596 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
597 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
597 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
598 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
599 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
600 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
601 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
602 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
598 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
599 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
600 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
601 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
602 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
603 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
604 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
604 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
605 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
606 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
605 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
606 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
607 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
608 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
609 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
610 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
611 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
612 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
612 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
613 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
614 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
615 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
616 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -620,20 +621,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
621 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
622 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
623 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
623 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
624 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
624 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
625 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
626 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
626 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
627 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
627 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
628 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
629 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
630 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
630 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
631 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
632 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
633 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
634 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
635 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
635 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
636 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
636 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
637 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
638 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
639 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
640 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -642,20 +643,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
643 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
644 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
645 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
645 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
646 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
647 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
648 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
649 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
650 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
650 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
651 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
652 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
654 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
655 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
651 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
652 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
653 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
654 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
655 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
656 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
657 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
657 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
658 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
658 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
659 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
660 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
661 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
662 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -679,17 +680,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
680 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
681 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
682 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
682 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
683 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
684 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
685 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
683 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
684 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
685 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
686 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
687 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
688 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
689 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
690 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
691 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
691 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
692 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
692 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
693 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
694 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
695 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
696 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -705,48 +706,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
706 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
707 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
708 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
708 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
709 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
710 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
711 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
712 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
713 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
714 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
715 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
715 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
716 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
717 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
718 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
719 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
719 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
720 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
721 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
721 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
722 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
723 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
724 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
724 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
725 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
726 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
727 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
728 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
729 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
729 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
730 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
731 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
732 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
730 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
731 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
732 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
733 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
734 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
735 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
736 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
737 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
738 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
738 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
739 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
740 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
740 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
741 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
742 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
741 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
742 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
743 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
744 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
745 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
746 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
746 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
747 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
748 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
748 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
749 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
749 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
750 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
751 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
752 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
753 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -754,119 +755,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
755 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
756 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
757 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
757 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
758 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
759 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
760 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
761 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
762 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
763 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
764 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
765 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
766 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
767 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
768 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
769 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
770 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
771 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
772 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
773 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
774 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
775 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
776 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
777 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
778 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
779 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
780 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
781 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
782 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
783 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
784 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
785 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
786 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
787 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
788 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
789 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
790 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
791 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
792 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
793 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
794 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
795 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
796 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
797 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
798 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
799 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
800 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
801 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
802 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
803 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
804 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
805 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
806 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
807 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
808 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
809 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
810 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
811 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
812 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
813 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
814 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
815 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
816 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
817 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
818 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
819 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
820 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
821 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
822 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
823 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
824 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
825 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
826 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
827 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
828 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
829 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
830 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
831 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
832 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
833 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
834 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
835 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
836 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
837 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
838 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
839 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
840 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
841 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
842 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
843 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
844 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
845 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
846 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
847 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
848 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
849 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
850 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
851 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
758 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
759 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
760 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
761 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
762 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
763 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
764 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
765 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
766 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
767 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
768 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
769 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
770 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
771 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
772 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
773 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
774 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
775 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
776 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
777 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
778 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
779 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
780 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
781 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
782 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
783 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
784 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
785 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
786 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
787 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
788 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
789 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
790 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
791 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
792 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
793 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
794 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
795 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
796 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
797 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
798 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
799 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
800 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
801 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
802 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
803 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
804 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
805 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
806 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
807 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
808 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
809 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
810 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
811 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
812 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
813 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
814 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
815 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
816 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
817 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
818 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
819 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
820 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
821 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
822 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
823 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
824 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
825 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
826 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
827 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
828 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
829 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
830 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
831 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
832 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
833 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
834 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
835 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
836 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
837 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
838 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
839 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
840 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
841 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
842 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
843 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
844 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
845 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
846 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
847 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
848 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
849 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
850 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
851 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
852 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
853 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
854 +l.Init();return l},ZLIB=ZLIB||{};
855 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
856 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
854 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
855 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
856 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
857 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
858 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
859 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
860 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
858 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
859 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
861 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
862 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
863 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
864 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
862 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
863 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
864 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
865 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
865 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
866 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
867 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
868 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
869 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
870 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
868 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
869 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
871 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
872 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
873 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
874 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
875 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -888,22 +891,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
891 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
892 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
893 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
891 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
892 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
893 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
894 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
895 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
894 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
895 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
896 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
897 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
898 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
899 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
900 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
901 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
902 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
903 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
901 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
902 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
904 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
905 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
906 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
904 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
905 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
906 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
907 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
908 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
909 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
910 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
911 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
912 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -919,16 +922,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
922 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
923 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
924 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
922 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
923 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
924 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
925 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
926 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
927 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
928 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
925 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
926 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
927 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
928 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
929 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
930 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
931 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
932 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
930 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
931 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Cargando...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
933 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
934 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Cargando...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
935 StatusStrs=["Desconectado","Conectando ...","Preparar...","Conectado"],t,t2,rsepass=null;
936 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
937 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -962,15 +965,15 @@ var DMTFPowerStates=";;Encendido;Sue\u00f1o ligero;Sue\u00f1o profundo;Ciclo de
965 function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Desconocido</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Encendido"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
966 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Conectado",", En la bater\u00eda"][v.PowerSource]);d+=TableEntry("Poder",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Ninguna</i>":EscapeHtml(c);d+=TableEntry("Nombre y dominio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
967 d+=TableEntry("ID del sistema",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID del sistema",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" activado en modo de control de administrador (ACM)",4==l.ProvisioningMode&&(n=" activado en modo de control de cliente (CCM)",b=9));d+=TableEntry("Intel&reg; ME",
965 -"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
966 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
967 -p&&(e+=", Puerto de redireccionamiento");q&&(e+=", Serie sobre LAN");n&&(e+=", IDE-Redirect");h&&(e+=", KVM");""==e&&(e=" Ninguna");d+=TableEntry("Caracter\u00edsticas activas",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Pantalla principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Pantalla principal",
968 +"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
969 +p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
970 +q&&(e+=", Puerto de redireccionamiento");p&&(e+=", Serie sobre LAN");n&&(e+=", IDE-Redirect");g&&(e+=", KVM");""==e&&(e=" Ninguna");d+=TableEntry("Caracter\u00edsticas activas",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Pantalla principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Pantalla principal",
971 "Pantalla secundaria","Tercera pantalla"][n.DefaultScreen]),e='<span title="'+format("La pantalla remota predeterminada es {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Puerto 5900 habilitado"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"segundos de suscripci\u00f3n":"segundo opt-in")),e+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" hora de t\u00e9rmino de la sesi\u00f3n",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?
969 -((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Blanking permitido"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Escritorio remoto",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&
970 -(e="Estado desconocido",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="No requerido"),1==p&&(e="Requerido solo para KVM"),4294967295==p&&(e="Siempre requerido"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimiento del usuario",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Desconocido",1:"Otro",
972 +((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Blanking permitido"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Escritorio remoto",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&
973 +(e="Estado desconocido",q=amtsysstate.IPS_OptInService.response.OptInRequired,0==q&&(e="No requerido"),1==q&&(e="Requerido solo para KVM"),4294967295==q&&(e="Siempre requerido"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimiento del usuario",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Desconocido",1:"Otro",
974 2:"Habilitado",3:"Discapacitado",4:"Apagando",5:"No aplica",6:"Habilitado pero sin conexi\u00f3n",7:"En prueba",8:"Diferido",9:"Quietud",10:"Comenzando",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Desconocido",d+=TableEntry("Boot Features",addLinkConditional(n,
972 -"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Pol\u00edtica de energ\u00eda",
973 -addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Fecha y hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Acciones de poder ...","showPowerActionDlg()")+" ";e+=AddButton("Guardar Estado...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
975 +"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("Pol\u00edtica de energ\u00eda",
976 +addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Fecha y hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Acciones de poder ...","showPowerActionDlg()")+" ";e+=AddButton("Guardar Estado...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
977 QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Cambiar la configuraci\u00f3n de red puede hacer que esta p\u00e1gina no est\u00e9 disponible.");d=d+"<br><h2>Configuraci\u00f3n general</h2>"+TableStart();e="";"<i>Ninguna</i>"!=c&&(1==v.SharedFQDN&&(e=", compartido con el sistema operativo"),0==v.SharedFQDN&&(e=", diferente del sistema operativo"));d+=TableEntry("Nombre y dominio",
978 addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="Discapacitado";1==v.DDNSUpdateEnabled?c="Habilitado cada"+v.DDNSPeriodicUpdateInterval+" minutos, TTL es"+v.DDNSTTL+" minutos":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Actualizaci\u00f3n por servidor DHCP");d+=TableEntry("DNS Din\u00e1mico",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||
979 1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interfaz inal\u00e1mbrica":"Interfaz cableada")+"</h2>";d+=TableStart();d+=TableEntry("Estado de enlace",1==c.LinkIsUp?"Enlace est\u00e1 arriba":"El enlace est\u00e1 ca\u00eddo");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(B in c.LinkPolicy)1==c.LinkPolicy[B]&&e.push("S0 / AC"),14==c.LinkPolicy[B]&&e.push("Sx / AC"),16==c.LinkPolicy[B]&&e.push("S0 / DC"),
@@ -979,7 +982,7 @@ xxAccountAdminName)),s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry(
982 "Habilitado":"Discapacitado","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Habilitado":"Discapacitado",
983 "showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Responder al ping",addLinkConditional(["Discapacitado","Respuesta ICMP","Respuesta RMCP","Respuesta ICMP y RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Autom\u00e1tico usando el servidor DHCP":"Direcci\u00f3n IP est\u00e1tica",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("Estado IPv4",
984 addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Direcci\u00f3n IPv4",isIpAddress(c.IPAddress,"Ninguna"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Puerta de enlace IPv4 / M\u00e1scara",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Ninguna")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Servidor de nombres de dominio IPv4",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];
982 -for(var p="Discapacitado",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Direcciones habilitadas, autom\u00e1ticas y manuales":"Habilitado, direcciones autom\u00e1ticas");d+=TableEntry("Estado IPv6",addLinkConditional(p,
985 +for(var q="Discapacitado",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Direcciones habilitadas, autom\u00e1ticas y manuales":"Habilitado, direcciones autom\u00e1ticas");d+=TableEntry("Estado IPv6",addLinkConditional(q,
986 "showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("Direcci\u00f3n IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Direcci\u00f3n IPv6","Ninguna");isIpAddress(c.CurrentDefaultRouter)&&
987 (d+=TableEntry("Enrutador predeterminado IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Servidor de nombres de dominio IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&
988 5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
@@ -1028,8 +1031,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1031 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Discapacitado":"Habilitado",c&2&&(b+=", Bloqueado"),c&4&&(b+=", Casi lleno"),c&8&&(b+=", Completo"),c&16&&(b+=", No hay llave"),c="<h1>Configuraci\u00f3n del registro de auditor\u00eda</h1>"+TableStart(),c+=TableEntry("Estado",b),c+=TableEntry("Almacenamiento",a[0].CurrentNumberOfRecords+" registros),"+a[0].PercentageFree+"% gratis"),c+=TableEntry("Pol\u00edtica de sobrescritura",2==a[0].OverwritePolicy?"Se envuelve cuando est\u00e1 lleno":
1032 "Nunca sobrescribe"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1033 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtrar" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salvar...","SaveAuditLog()")+AddButton("Borrar registro","ClearAuditLog()"))+"<br>");if(0==c.length)d="No se encontraron eventos de registro de auditor\u00eda.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Hora</b><td class=r1 style=width:260px><b>Iniciador</b><td class=r1><b>Action</b>";
1031 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1032 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditor\u00eda de Intel AMT",auditLog)}
1034 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1035 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditor\u00eda de Intel AMT",auditLog)}
1036 function ClearAuditLog(b){QH(60,"\u00bfBorrar el registro de auditor\u00eda?");setDialogMode(1,"Registro de auditor\u00eda",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1037 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Registro de auditor\u00eda","Error: "+d)}
1038 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Hora",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniciador",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Habla a",a.NetAddress));d+=addHtmlValue("Solicitud",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Datos extendidos",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=
@@ -1081,7 +1084,7 @@ function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabi
1084 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Watchdogs m\u00e1ximos",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" perros guardianes");b+=TableEntry("M\u00e1ximo total de acciones",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" comportamiento");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Administre los perros guardianes de presencia de agente Intel&reg; AMT.<br><br>";if(null==
1085 xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>No se encontr\u00f3 ning\u00fan agente de vigilancia de presencia de agentes.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1086 b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Agregar acci\u00f3n ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Eliminar acciones ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1084 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=": Evento para registrar")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("A\u00f1adir perro guardi\u00e1n ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1087 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento para registrar")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("A\u00f1adir perro guardi\u00e1n ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1088 function getWatchdogTransitionStr(b){if(31==b)return"Cualquier estado";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1089 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Descripci\u00f3n",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entidad monitoreada",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Estado actual",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Estado habilitado",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervalo de inicio",
1090 b.StartupInterval+" segundos)");c+=addHtmlValue("Intervalo de tiempo de espera",b.TimeoutInterval+" segundos)");setDialogMode(11,format("Perro guardi\u00e1n {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1177,7 +1180,7 @@ v&&(n+="Discapacitado,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Rei
1180 "newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1181 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Editar cuenta",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1182 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nueva cuenta",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1180 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Error de cuenta","Par\u00e1metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1183 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Error de cuenta","Par\u00e1metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1184 l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1185 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrador</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1186 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Solo locales","Solo red","Todo (local y de red)"];
@@ -1195,8 +1198,8 @@ c3.value="Iniciar captura"}}function terminal_FileSelectHandler(b){haltEvent(b);
1198 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1199 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1200 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1198 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1199 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1201 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1202 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1203 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1204 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1205 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1207,14 +1210,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1210 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1211 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1212 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Conectar":"Desconectar";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Escritorio remoto","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Escritorio remoto","The device indicated that this type of connection of not supported."):5E4==
1210 -b.disconnectCode?messagebox("Escritorio remoto","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1211 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configuraci\u00f3n de escritorio remoto",3,showDesktopSettingsChanged))}
1213 +b.disconnectCode?messagebox("Escritorio remoto","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Escritorio remoto","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1214 +break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1215 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configuraci\u00f3n de escritorio remoto",3,showDesktopSettingsChanged))}
1216 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1217 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1214 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1215 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1216 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1217 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1218 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1219 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1220 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1221 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1222 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1223 "8px"),center()))}
1224 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Entrada remota de teclado",3,showDeskTypeEx,'<div>Ingrese el texto y haga clic en Aceptar para escribirlo de forma remota con un teclado de ingl\u00e9s de EE. UU. Aseg\u00farese de colocar el cursor remoto en la posici\u00f3n correcta antes de continuar.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1225,13 +1229,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1229 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1230 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1231 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1228 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1232 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1233 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1234 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1235 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1232 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Ra\u00edz</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1233 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1234 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1236 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Ra\u00edz</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1237 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1238 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1239 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1240 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1241 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1354,10 +1358,9 @@ addOption("d5actionSelect","Restablecer a BIOS",101));1==amtPowerBootCapabilitie
1358 amtversion&&addOption("d5actionSelect","Consentimiento del usuario ...",998);setDialogMode(5,"Acciones de poder",3,powerActionDlgCheck)}else messagebox("Acci\u00f3n de poder",format("No se pueden obtener las capacidades del sistema, error {0}",d))}
1359 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"Acci\u00f3n de poder completada."):QH(60,format("Error de acci\u00f3n de energ\u00eda # {0}.",e));setDialogMode(1,"Acci\u00f3n de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u00bfConfirmar la ejecuci\u00f3n de Intel&reg; Remote Secure Erase?<br>Ingrese la contrase\u00f1a de borrado seguro si es necesario.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Contrase\u00f1a</div></div><br><div style=color:red><b> ADVERTENCIA: </b> Esto borrar\u00e1 los datos del sistema remoto.</div>",
1360 rsepass=1,setDialogMode(11,"Acciones de poder",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1357 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ADVERTENCIA: </b> Esto borrar\u00e1 los datos del sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1358 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1359 -a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Acciones de poder",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1360 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1361 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ADVERTENCIA: </b> Esto borrar\u00e1 los datos del sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1362 +d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1363 +"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Acciones de poder",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1364 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Acci\u00f3n de poder","Comprobando estado ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1365 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Acci\u00f3n de poder","Comprobando estado ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1366 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1392,10 +1395,10 @@ function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Acci\u00f3n de poder comp
1395 function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1396 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1397 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1395 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1396 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Administre el almacenamiento Intel&reg; AMT para esta computadora.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1397 -" / "+p):e+"Ra\u00edz";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Descargar","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1398 -q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>No se encontraron archivos.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1398 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1399 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Administre el almacenamiento Intel&reg; AMT para esta computadora.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+
1400 +" / "+q):e+"Ra\u00edz";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Descargar","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==
1401 +p&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>No se encontraron archivos.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1402 (v?AddButton("Subir...","UploadToStorage()"):""));QH(55,a)}else QH(55,"No se pueden cargar los datos de almacenamiento ...<br/>"+AddButton("Actualizar","PullStorage()"))}
1403 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Vendedor",b));""!=c&&(e+=addHtmlValue("Solicitud",c));e+=addHtmlValue("Nombre",a);e+=addHtmlValue("Talla",v.size+" bytes");v.link&&(e+=addHtmlValue("Enlace",v.link));setDialogMode(11,"Art\u00edculo de almacenamiento",5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1404 function storageDeleteResponse(b,c){200!=c?messagebox("Almacenamiento",format("No se puede eliminar el archivo (ERR {0}), verifique que la computadora est\u00e9 encendida.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}
@@ -1410,7 +1413,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1413 b}
1414 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1415 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1413 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dias").replace("H"," horas").replace("M"," minutos");b=b.replace(" 1 d\u00eda"," 1 d\u00eda").replace(" 1 hora"," 1 hora").replace(" 1 minuto"," 1 minuto");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1416 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dias").replace("H"," horas").replace("M"," minutos");b=b.replace(" 1 d\u00eda"," 1 d\u00eda").replace(" 1 hora"," 1 hora").replace(" 1 minuto "," 1 minuto ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1417 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestionar alarmas de despertador.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, despertar en "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," a"),void 0!=d[c].Interval&&(a+=" y cada"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", eliminar cuando haya terminado"),
1418 b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Editar...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>No hay alarmas de despertador registradas.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Eliminar todas las alarmas","RemoveAllAlarms()")+
1419 AddButton("A\u00f1adir","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-fr.htm
+623 -619
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="fr" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Relier onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Débranché</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>État du système</a><p id=go14 class=nav1 onclick=go(14)><a>Bureau à distance</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Des dossiers</a><p id=go13 class=nav1 onclick=go(13)><a>Série sur LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informations matériel</a><p id=go6 class=nav1 onclick=go(6)><a>Journal des événements</a><p id=go15 class=nav1 onclick=go(15)><a>Journal d'audit</a><p id=go21 class=nav1 onclick=go(21)><a>Espace de rangement</a><p id=go8 class=nav1 onclick=go(8)><a>Paramètres réseau</a><p id=go17 class=nav1 onclick=go(17)><a>Paramètres Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Paramètres de sécurité</a><p id=go19 class=nav1 onclick=go(19)><a>Présence d'agent</a><p id=go18 class=nav1 onclick=go(18)><a>Défense du système</a><p id=go11 class=nav1 onclick=go(11)><a>Comptes utilisateur</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Alarmes de réveil</a><p id=go12 class=nav1 onclick=go(12)><a>Navigateur WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Carte du disque" onclick=iderToggleDiskMap()><input type=button value="Arrêter la session IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquette, les blocs font 512 octets.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, les blocs font 2048 octets.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Le firmware de cet ordinateur doit être mis à jour,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>veuillez vérifier ici</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Chargement...</h1></div><div id=p1 style=display:none><h1>État du système</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informations matériel</h1><span id=16></span></div><div id=p6 style=display:none><h1>Journal des événements</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Paramètres réseau</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Comptes utilisateur</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navigateur WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Requete style=margin:4px onclick=wsmanQuery()><input type=button value=Clair style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtre style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal série sur LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonction série sur LAN est désactivé<span id=26>, cliquez ici pour l'activer.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Commencer la capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Relier onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Débranché.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Inverser ce que la touche retour enverra" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Basculer la taille du terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Basculer le type d'émulation des touches F1 à F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii étendu" title="Basculer le type d'émulation de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retour arrière<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pâte disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Bureau à distance</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonctionnalité KVM est désactivé<span id=37>, cliquez ici pour l'activer.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Tourne à gauche" onclick=drotate(-1)>↺</div><div class=rb title="Tourner à droite" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Basculer en mode plein écran" onkeypress="return false" onkeydown="return false" value=Plein onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Enregistrer une capture d'écran du bureau distant" onkeypress="return false" onkeydown="return false" value=Sauver... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Réglages... title="Modifier les paramètres du bureau distant" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Modifier l'état d'alimentation de la machine distante" onkeypress="return false" onkeydown="return false" value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Relier onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Débranché.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Gagner<option value=1>Win + Down<option value=2>Gagnez +<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Gagner + Gauche<option value=24>Win + Right<option value=5>Maj + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Suppr onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Écran blanc&nbsp;</span><span id=47><input id=48 type=checkbox>Voir seulement&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Journal d'audit</h1><span id=50></span></div><div id=p16 style=display:none><h1>Paramètres de sécurité</h1><span id=51></span></div><div id=p17 style=display:none><h1>Paramètres Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Défense du système</h1><span id=53></span></div><div id=p19 style=display:none><h1>Présence d'agent</h1><span id=54></span></div><div id=p21 style=display:none><h1>Espace de rangement</h1><span id=55></span></div><div id=p22 style=display:none><h1>Abonnements aux événements</h1><span id=56></span></div><div id=p23 style=display:none><h1>Alarmes de réveil</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Des dossiers</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value="En haut">&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Tout sélectionner" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renommer onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Supprimer onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nouveau dossier" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Télécharger onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Couper onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copie onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pâte onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Rafraîchir onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descendre par nom<option value=5>Descendre par taille<option value=6>Descendre par date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nom d'utilisateur</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Mot de passe*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmez le mot de passe</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Réseau<option value=2>Tout</select><div>Autorisation</div></div><div>Autorisations accordées</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* 8 caractères minimum avec majuscules, minuscules, 0-9 et l'un des! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Action de puissance</div></div><div><span style=color:red>Attention:</span>Certaines actions d'alimentation peuvent entraîner une perte de données et déconnecter les sessions de redirection du bureau, du terminal ou du disque.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Code de consentement</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Affichage principal<option value=1>Affichage secondaire<option id=d6ThirdDisplay value=2 style=display:none>Troisième affichage</select><div>Affichage du consentement</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Encodage d'image</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Afficher le curseur de la souris locale</label><br><label><input type=checkbox id=d7showcad>Afficher Ctrl-Alt-Suppr</label><br><label><input type=checkbox id=d7limitFrameRate>Taux de trame limite</label><br><label><input type=checkbox id=d7noMouseRotate>Ne faites pas tourner la souris</label><br></div><div>Autres réglages</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Logiciel KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>dix%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Mise à l'échelle</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administrateur style=float:right;width:220px><div style=height:20px>Nom d'utilisateur</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Mot de passe</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Port de redirection</label><label id=c15 style=display:block><input type=checkbox id=c16>Bureau à distance KVM</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Série sur LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non requis<br></label><label><input type=radio name=d10 id=c20 value=1>Requis pour KVM uniquement<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Toujours requis<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">Nom de profil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorité</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Authentification</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Aucun</select><div>Chiffrement</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Mot de passe*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Confirmez le mot de passe</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Cela enregistrera l'intégralité de l'état d'Intel® AMT pour cette machine dans un fichier. Les mots de passe ne seront pas enregistrés, mais certaines données sensibles peuvent être incluses.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>désactivé<br><input type=radio name=d20 id=d20b value=1>Réponse ICMP<br><input type=radio name=d20 id=d20c value=2>Réponse RMCP<br><input type=radio name=d20 id=d20d value=3>Réponse ICMP et RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisation de l'adresse IP du système d'exploitation</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>adresse IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marque de sous-réseau</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>passerelle</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS principal</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternatif</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>désactivé<option value=1>Désactivé, mise à jour DHCP<option value=2>Activée</select><div>Client DNS dynamique</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalle de mise à jour (minutes)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (secondes)</div></div><div style=font-size:10px><br>L'intervalle par défaut est de 1440 minutes, le TTL par défaut est de 900 secondes.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Réinitialiser<option value=5>Cycle de puissance<option value=8>Éteindre<option id=d24p500 value=500>Réveil du système d'exploitation en veille<option id=d24p501 value=501>Économie d'énergie du système d'exploitation<option value=999>Définir les options de démarrage</select><div>Commande à distance</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pause du BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Appliquer le démarrage sécurisé</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuration du BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forcer les événements de progression</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton d'alimentation</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de réinitialisation</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de veille</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Verrouiller le clavier</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Contournement du mot de passe du BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflasher le BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Mode sans échec</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Utiliser IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Série sur LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Effacement sécurisé à distance Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Paramètres de démarrage</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Aucun<option id=ForceDVDBootOption value=1>Forcer le démarrage du CD / DVD<option id=ForcePXEBootOption value=2>Forcer le démarrage PXE<option id=ForceHDBootOption value=3>Forcer l'amorçage du disque dur<option id=ForceDiagBootOption value=4>Forcer le démarrage du diagnostic</select><div>Source de démarrage</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Aucun<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Démarrage sur CD-ROM</select><div>Périphérique de démarrage IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Défaut du système<option id=c46 value=1>Silencieux<option id=c47 value=2>Verbeux<option id=c48 value=3>Écran blanc</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Mot de passe RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nom de l'alarme</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Date de réveil (année-mois-jour)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Heure de réveil (heure: min: sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervalle (jours-heures-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Gardez l'alarme<option value=1>Supprimer à la fin</select></div><div style=padding-top:4px>Après le réveil</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Activée<br></label><label><input type=radio name=d26b id=c50 value=0>désactivé<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Activée<br></label><label><input type=radio name=d26a id=c52 value=0>désactivé<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value="D'accord" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Supprimer style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="fr" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Relier onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Débranché</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>État du système</a><p id=go14 class=nav1 onclick=go(14)><a>Bureau à distance</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Des dossiers</a><p id=go13 class=nav1 onclick=go(13)><a>Série sur LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informations matériel</a><p id=go6 class=nav1 onclick=go(6)><a>Journal des événements</a><p id=go15 class=nav1 onclick=go(15)><a>Journal d'audit</a><p id=go21 class=nav1 onclick=go(21)><a>Espace de rangement</a><p id=go8 class=nav1 onclick=go(8)><a>Paramètres réseau</a><p id=go17 class=nav1 onclick=go(17)><a>Paramètres Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Paramètres de sécurité</a><p id=go19 class=nav1 onclick=go(19)><a>Présence d'agent</a><p id=go18 class=nav1 onclick=go(18)><a>Défense du système</a><p id=go11 class=nav1 onclick=go(11)><a>Comptes utilisateur</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnements</a><p id=go23 class=nav1 onclick=go(23)><a>Alarmes de réveil</a><p id=go12 class=nav1 onclick=go(12)><a>Navigateur WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Carte du disque" onclick=iderToggleDiskMap()><input type=button value="Arrêter la session IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Disquette, les blocs font 512 octets.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, les blocs font 2048 octets.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Le firmware de cet ordinateur doit être mis à jour,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>veuillez vérifier ici</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Chargement...</h1></div><div id=p1 style=display:none><h1>État du système</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informations matériel</h1><span id=16></span></div><div id=p6 style=display:none><h1>Journal des événements</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Paramètres réseau</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Comptes utilisateur</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navigateur WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Requete style=margin:4px onclick=wsmanQuery()><input type=button value=Clair style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtre style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal série sur LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonction série sur LAN est désactivé<span id=26>, cliquez ici pour l'activer.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Commencer la capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Relier onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Débranché.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Inverser ce que la touche retour enverra" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Basculer la taille du terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Basculer le type d'émulation des touches F1 à F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii étendu" title="Basculer le type d'émulation de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Retour arrière<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Pâte disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Bureau à distance</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Le port de redirection Intel® AMT ou la fonctionnalité KVM est désactivé<span id=37>, cliquez ici pour l'activer.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>L'ordinateur distant n'est pas sous tension, cliquez ici pour lancer une commande d'alimentation.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Tourne à gauche" onclick=drotate(-1)>↺</div><div class=rb title="Tourner à droite" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Basculer en mode plein écran" onkeypress="return false" onkeydown="return false" value=Plein onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Enregistrer une capture d'écran du bureau distant" onkeypress="return false" onkeydown="return false" value=Sauver... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Réglages... title="Modifier les paramètres du bureau distant" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Démarrer l'opération de montage de disque à distance" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Modifier l'état d'alimentation de la machine distante" onkeypress="return false" onkeydown="return false" value="Actions de puissance ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Relier onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Débranché.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Gagner<option value=1>Win + Down<option value=2>Gagnez +<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Gagner + Gauche<option value=24>Win + Right<option value=5>Maj + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Envoyer onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Suppr onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Écran blanc&nbsp;</span><span id=47><input id=48 type=checkbox>Voir seulement&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Journal d'audit</h1><span id=50></span></div><div id=p16 style=display:none><h1>Paramètres de sécurité</h1><span id=51></span></div><div id=p17 style=display:none><h1>Paramètres Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Défense du système</h1><span id=53></span></div><div id=p19 style=display:none><h1>Présence d'agent</h1><span id=54></span></div><div id=p21 style=display:none><h1>Espace de rangement</h1><span id=55></span></div><div id=p22 style=display:none><h1>Abonnements aux événements</h1><span id=56></span></div><div id=p23 style=display:none><h1>Alarmes de réveil</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Des dossiers</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value="En haut">&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Tout sélectionner" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renommer onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Supprimer onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nouveau dossier" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Télécharger onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Couper onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copie onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Pâte onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Rafraîchir onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Trier par nom<option value=2>Trier par taille<option value=3>Trier par date<option value=4>Descendre par nom<option value=5>Descendre par taille<option value=6>Descendre par date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nom d'utilisateur</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Mot de passe*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirmez le mot de passe</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Réseau<option value=2>Tout</select><div>Autorisation</div></div><div>Autorisations accordées</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* 8 caractères minimum avec majuscules, minuscules, 0-9 et l'un des! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Action de puissance</div></div><div><span style=color:red>Attention:</span>Certaines actions d'alimentation peuvent entraîner une perte de données et déconnecter les sessions de redirection du bureau, du terminal ou du disque.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Code de consentement</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Affichage principal<option value=1>Affichage secondaire<option id=d6ThirdDisplay value=2 style=display:none>Troisième affichage</select><div>Affichage du consentement</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Encodage d'image</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>désactivé<option value=2>Automatic<option value=3>Activée</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Afficher le curseur de la souris locale</label><br><label><input type=checkbox id=d7showcad>Afficher Ctrl-Alt-Suppr</label><br><label><input type=checkbox id=d7limitFrameRate>Taux de trame limite</label><br><label><input type=checkbox id=d7noMouseRotate>Ne faites pas tourner la souris</label><br></div><div>Autres réglages</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Logiciel KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>dix%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualité</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Mise à l'échelle</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=administrateur style=float:right;width:220px><div style=height:20px>Nom d'utilisateur</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Mot de passe</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Port de redirection</label><label id=c15 style=display:block><input type=checkbox id=c16>Bureau à distance KVM</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Série sur LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non requis<br></label><label><input type=radio name=d10 id=c20 value=1>Requis pour KVM uniquement<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Toujours requis<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">Nom de profil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="32 caractères maximum"><div title="32 caractères maximum">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorité</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Authentification</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Aucun</select><div>Chiffrement</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Mot de passe*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Longueur entre 8 et 63 caractères"><div title="Longueur entre 8 et 63 caractères">Confirmez le mot de passe</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Cela enregistrera l'intégralité de l'état d'Intel® AMT pour cette machine dans un fichier. Les mots de passe ne seront pas enregistrés, mais certaines données sensibles peuvent être incluses.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>désactivé<br><input type=radio name=d20 id=d20b value=1>Réponse ICMP<br><input type=radio name=d20 id=d20c value=2>Réponse RMCP<br><input type=radio name=d20 id=d20d value=3>Réponse ICMP et RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Synchronisation de l'adresse IP du système d'exploitation</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>adresse IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marque de sous-réseau</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>passerelle</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS principal</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternatif</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>désactivé<option value=1>Désactivé, mise à jour DHCP<option value=2>Activée</select><div>Client DNS dynamique</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalle de mise à jour (minutes)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (secondes)</div></div><div style=font-size:10px><br>L'intervalle par défaut est de 1440 minutes, le TTL par défaut est de 900 secondes.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Réinitialiser<option value=5>Cycle de puissance<option value=8>Éteindre<option id=d24p500 value=500>Réveil du système d'exploitation en veille<option id=d24p501 value=501>Économie d'énergie du système d'exploitation<option value=999>Définir les options de démarrage</select><div>Commande à distance</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pause du BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Appliquer le démarrage sécurisé</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuration du BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forcer les événements de progression</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton d'alimentation</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de réinitialisation</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Verrouiller le bouton de veille</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Verrouiller le clavier</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Contournement du mot de passe du BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflasher le BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Mode sans échec</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Utiliser IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Série sur LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Effacement sécurisé à distance Intel®</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Paramètres de démarrage</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Aucun<option id=ForceDVDBootOption value=1>Forcer le démarrage du CD / DVD<option id=ForcePXEBootOption value=2>Forcer le démarrage PXE<option id=ForceHDBootOption value=3>Forcer l'amorçage du disque dur<option id=ForceDiagBootOption value=4>Forcer le démarrage du diagnostic</select><div>Source de démarrage</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Aucun<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Démarrage sur CD-ROM</select><div>Périphérique de démarrage IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Défaut du système<option id=c46 value=1>Silencieux<option id=c47 value=2>Verbeux<option id=c48 value=3>Écran blanc</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Mot de passe RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nom de l'alarme</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Date de réveil (année-mois-jour)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Heure de réveil (heure: min: sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervalle (jours-heures-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Gardez l'alarme<option value=1>Supprimer à la fin</select></div><div style=padding-top:4px>Après le réveil</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Activée<br></label><label><input type=radio name=d26b id=c50 value=0>désactivé<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Activée<br></label><label><input type=radio name=d26a id=c52 value=0>désactivé<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Annuler style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value="D'accord" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Supprimer style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,177 +12,178 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Donn\u00e9es invalides";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Donn\u00e9es invalides";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"Agent de surveillance"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... chang\u00e9 en"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusion de cas";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Une session Serial Over LAN distante a \u00e9t\u00e9 \u00e9tablie.";if(1==c[2])return"La session Serial Over LAN \u00e0 distance est termin\u00e9e. Le contr\u00f4le utilisateur a \u00e9t\u00e9 restaur\u00e9.";if(2==c[2])return"Une session IDE-Redirection distante a \u00e9t\u00e9 \u00e9tablie.";
93 +a&&170==c[0])return"Agent de surveillance"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... chang\u00e9 en"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrusion de cas";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Une session Serial Over LAN distante a \u00e9t\u00e9 \u00e9tablie.";if(1==c[2])return"La session Serial Over LAN \u00e0 distance est termin\u00e9e. Le contr\u00f4le utilisateur a \u00e9t\u00e9 restaur\u00e9.";if(2==c[2])return"Une session IDE-Redirection distante a \u00e9t\u00e9 \u00e9tablie.";
94 if(3==c[2])return"Session IDE-Redirection distante termin\u00e9e. Le contr\u00f4le utilisateur a \u00e9t\u00e9 restaur\u00e9."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="c\u00e2bl\u00e9"),4294967293==a?"Tous les filtres de paquets re\u00e7us ont \u00e9t\u00e9 mis en correspondance sur"+b+" interface.":4294967292==a?"Tous les filtres de paquets sortants ont \u00e9t\u00e9 mis en correspondance sur"+b+" interface.":4294967290==a?"Le filtre de paquets usurp\u00e9 a \u00e9t\u00e9 mis en correspondance sur"+
95 b+" interface.":"Filtre"+a+" a \u00e9t\u00e9 appari\u00e9 sur"+b+" interface.";if(192==a)return 0==c[2]?"Politique de s\u00e9curit\u00e9 invoqu\u00e9e. Une partie ou la totalit\u00e9 du trafic r\u00e9seau (TX) a \u00e9t\u00e9 arr\u00eat\u00e9e.":2==c[2]?"Politique de s\u00e9curit\u00e9 invoqu\u00e9e. Une partie ou la totalit\u00e9 du trafic r\u00e9seau (RX) a \u00e9t\u00e9 arr\u00eat\u00e9e.":"Politique de s\u00e9curit\u00e9 invoqu\u00e9e.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Demande de connexion \u00e0 distance par l'utilisateur.";
96 if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Erreur EAC: essayez d'obtenir la posture alors que NAC dans Intel\ufffd AMT est d\u00e9sactiv\u00e9.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Erreur HWA: erreur g\u00e9n\u00e9rale"}return 6==a?"Authentification \u00e9chou\u00e9e"+(c[1]+(c[2]<<8))+" fois. Le syst\u00e8me peut \u00eatre attaqu\u00e9.":30==a?"Pas de support de d\u00e9marrage":32==a?"Blocage du syst\u00e8me d'exploitation ou interruption d'alimentation":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":
97 -"\u00c9chec de d\u00e9marrage du syst\u00e8me":37==a?"Le microprogramme du syst\u00e8me a d\u00e9marr\u00e9 (au moins un processeur s\u2019ex\u00e9cute correctement).":"Type de capteur inconnu #"+a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,
98 -0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>Port par d\u00e9faut KVM</i>",C=5);e=ReadInt(a,C);
99 -b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];
100 -h.PendingEnums=[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),
101 -function(d,x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,
102 -b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};
103 -h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==
104 -a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
108 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
110 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
111 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
112 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
113 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
115 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
116 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
118 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
120 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
121 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
122 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
123 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
125 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
127 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
128 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
130 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
133 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
134 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
135 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
137 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
138 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
139 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
142 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
143 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
144 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
145 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
148 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
149 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
150 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
97 +"\u00c9chec de d\u00e9marrage du syst\u00e8me":37==a?"Le microprogramme du syst\u00e8me a d\u00e9marr\u00e9 (au moins un processeur s\u2019ex\u00e9cute correctement).":"Type de capteur inconnu #"+a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,
98 +0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Port par d\u00e9faut KVM</i>",h=5);u=ReadInt(a,h);
99 +b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];
100 +g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),
101 +function(d,y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,
102 +b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};
103 +g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==
104 +a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
108 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
110 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
111 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
112 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
113 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
115 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
116 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
118 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
120 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
121 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
122 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
123 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
125 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
127 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
128 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
130 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
133 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
134 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
135 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
137 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
138 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
139 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
140 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
142 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
143 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
144 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
145 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
148 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
149 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
150 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
152 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
153 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
154 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
155 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
156 -[a,b,[]])};var E="Non sp\u00e9cifi\u00e9. ; Aucune m\u00e9moire syst\u00e8me n'est physiquement install\u00e9e dans le syst\u00e8me. ; Aucune m\u00e9moire syst\u00e8me utilisable, toute la m\u00e9moire install\u00e9e a rencontr\u00e9 une d\u00e9faillance irr\u00e9cup\u00e9rable. ; D\u00e9faillance irr\u00e9cup\u00e9rable du disque dur / ATAPI / IDE. ; D\u00e9faillance irr\u00e9cup\u00e9rable de la carte syst\u00e8me. ; Disquette irr\u00e9cup\u00e9rable \u00e9chec du sous-syst\u00e8me. ; \u00c9chec du contr\u00f4leur de disque dur irr\u00e9cup\u00e9rable. ; \u00c9chec du clavier PS / 2 ou USB irr\u00e9cup\u00e9rable. ; Support de d\u00e9marrage amovible introuvable. ; \u00c9chec du contr\u00f4leur vid\u00e9o irr\u00e9cup\u00e9rable. ; Aucun p\u00e9riph\u00e9rique vid\u00e9o d\u00e9tect\u00e9. ; Corruption de la ROM du micrologiciel (BIOS) d\u00e9tect\u00e9e. ; Inad\u00e9quation de la tension du processeur (les processeurs qui partagent la m\u00eame alimentation ont des exigences de tension non adapt\u00e9es) ; \u00c9chec de correspondance de la vitesse du processeur".split(";"),
157 -m="Non sp\u00e9cifi\u00e9. ; Initialisation de la m\u00e9moire. ; D\u00e9marrage de l'initialisation et du test du disque dur ; Initialisation du ou des processeurs secondaires ; Authentification de l'utilisateur ; Configuration du syst\u00e8me lanc\u00e9e par l'utilisateur ; Configuration des ressources USB ; Configuration des ressources PCI ; Initialisation de la ROM optionnelle ; Initialisation de la vid\u00e9o ; Initialisation du cache ; SM Initialisation du bus ; Initialisation du contr\u00f4leur de clavier ; Initialisation du contr\u00f4leur de gestion / contr\u00f4leur int\u00e9gr\u00e9 ; Fixation de la station d'accueil ; Activation de la station d'accueil ; \u00c9jection de la station d'accueil ; D\u00e9sactivation de la station d'accueil ; Appel du vecteur de r\u00e9veil du syst\u00e8me d'exploitation ; D\u00e9marrage du processus de d\u00e9marrage du syst\u00e8me d'exploitation ; Initialisation de la carte m\u00e8re ou de la carte m\u00e8re ; r\u00e9serv\u00e9 ; Initialisation de la disquette ; Test du clavier ; Test du dispositif de pointage ; Initialisation du processeur principal".split(";"),
155 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
156 +[a,b,[]])};var D="Non sp\u00e9cifi\u00e9. ; Aucune m\u00e9moire syst\u00e8me n'est physiquement install\u00e9e dans le syst\u00e8me. ; Aucune m\u00e9moire syst\u00e8me utilisable, toute la m\u00e9moire install\u00e9e a rencontr\u00e9 une d\u00e9faillance irr\u00e9cup\u00e9rable. ; D\u00e9faillance irr\u00e9cup\u00e9rable du disque dur / ATAPI / IDE. ; D\u00e9faillance irr\u00e9cup\u00e9rable de la carte syst\u00e8me. ; Disquette irr\u00e9cup\u00e9rable \u00e9chec du sous-syst\u00e8me. ; \u00c9chec du contr\u00f4leur de disque dur irr\u00e9cup\u00e9rable. ; \u00c9chec du clavier PS / 2 ou USB irr\u00e9cup\u00e9rable. ; Support de d\u00e9marrage amovible introuvable. ; \u00c9chec du contr\u00f4leur vid\u00e9o irr\u00e9cup\u00e9rable. ; Aucun p\u00e9riph\u00e9rique vid\u00e9o d\u00e9tect\u00e9. ; Corruption de la ROM du micrologiciel (BIOS) d\u00e9tect\u00e9e. ; Inad\u00e9quation de la tension du processeur (les processeurs qui partagent la m\u00eame alimentation ont des exigences de tension non adapt\u00e9es) ; \u00c9chec de correspondance de la vitesse du processeur".split(";"),
157 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
158 k="Non sp\u00e9cifi\u00e9 ; Autre ; Inconnu ; Processeur ; Disque ; P\u00e9riph\u00e9rique ; Module de gestion du syst\u00e8me ; Carte syst\u00e8me ; Module de m\u00e9moire ; Module processeur ; Alimentation \u00e9lectrique ; Ajouter dans la carte ; Carte du panneau avant ; Carte du panneau arri\u00e8re ; Carte du syst\u00e8me d'alimentation ; Fond de panier du lecteur ; Expansion interne du syst\u00e8me carte ; Autre carte syst\u00e8me ; Carte processeur ; Unit\u00e9 d'alimentation ; Module d'alimentation ; Carte de gestion de l'alimentation ; Carte du panneau arri\u00e8re du ch\u00e2ssis ; Ch\u00e2ssis syst\u00e8me ; Ch\u00e2ssis secondaire ; Autre carte de ch\u00e2ssis ; Baie d'unit\u00e9 de disque ; Baie p\u00e9riph\u00e9rique ; Baie de p\u00e9riph\u00e9rique ; Refroidissement par ventilateur ; Unit\u00e9 de refroidissement ; Interconnexion par c\u00e2ble ; P\u00e9riph\u00e9rique m\u00e9moire ; Logiciel de gestion du syst\u00e8me ; BIOS ; Intel (r) ME ; Bus syst\u00e8me ; Groupe ; Intel (r) ME ; Environnement externe ; Batterie ; Lame de traitement ; Commutateur de connectivit\u00e9 ; Processeur / module de m\u00e9moire ; Module d'E / S ; Module d'E / S du processeur ; Micrologiciel du contr\u00f4leur de gestion ; Canal IPMI ; Bus PCI ; Bus PCI express ; Bus SCSI ; Bus SATA / SAS ; Bus frontal du processeur".split(";");
159 -h.RealmNames=";; Redirection ;; Asset Hardware ; Remote Control ; Storage ; Event Manager ; Storage Admin ; Agent Presence Local ; Agent Presence Remote ; Disjoncteur ; Time Network ; Information g\u00e9n\u00e9rale ; Firmware Update ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Lecteur de journal des \u00e9v\u00e9nements ; Journal d'audit ; Domaine ACL ;;; Syst\u00e8me local".split(";");h.WatchdogCurrentStates={1:"Pas commenc\u00e9",2:"Arr\u00eat\u00e9",4:"Fonctionnement",
160 -8:"Expir\u00e9",16:"Suspendu"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",
161 -8:"WinRE"},D={16:"Administrateur de la s\u00e9curit\u00e9",17:"RCO",18:"Gestionnaire de redirection",19:"Gestionnaire de mise \u00e0 jour du micrologiciel",20:"Journal d'audit de s\u00e9curit\u00e9",21:"Heure du r\u00e9seau",22:"L'administration du r\u00e9seau",23:"Administration du stockage",24:"Responsable de l'\u00e9v\u00e9nement",25:"Gestionnaire de disjoncteurs",26:"Gestionnaire de pr\u00e9sence d'agent",27:"Configuration sans fil",28:"EAC",29:"KVM",30:"\u00c9v\u00e9nements de participation des utilisateurs",
159 +g.RealmNames=";; Redirection ;; Asset Hardware ; Remote Control ; Storage ; Event Manager ; Storage Admin ; Agent Presence Local ; Agent Presence Remote ; Disjoncteur ; Time Network ; Information g\u00e9n\u00e9rale ; Firmware Update ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Lecteur de journal des \u00e9v\u00e9nements ; Journal d'audit ; Domaine ACL ;;; Syst\u00e8me local".split(";");g.WatchdogCurrentStates={1:"Pas commenc\u00e9",2:"Arr\u00eat\u00e9",4:"Fonctionnement",
160 +8:"Expir\u00e9",16:"Suspendu"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",
161 +8:"WinRE"},C={16:"Administrateur de la s\u00e9curit\u00e9",17:"RCO",18:"Gestionnaire de redirection",19:"Gestionnaire de mise \u00e0 jour du micrologiciel",20:"Journal d'audit de s\u00e9curit\u00e9",21:"Heure du r\u00e9seau",22:"L'administration du r\u00e9seau",23:"Administration du stockage",24:"Responsable de l'\u00e9v\u00e9nement",25:"Gestionnaire de disjoncteurs",26:"Gestionnaire de pr\u00e9sence d'agent",27:"Configuration sans fil",28:"EAC",29:"KVM",30:"\u00c9v\u00e9nements de participation des utilisateurs",
162 32:"Masquage d'\u00e9cran",33:"\u00c9v\u00e9nements de surveillance",1600:"Provisioning Started",1601:"Approvisionnement termin\u00e9",1602:"Entr\u00e9e ACL ajout\u00e9e",1603:"Entr\u00e9e ACL modifi\u00e9e",1604:"Entr\u00e9e ACL supprim\u00e9e",1605:"Acc\u00e8s ACL avec des informations d'identification non valides",1606:"\u00c9tat d'entr\u00e9e ACL",1607:"\u00c9tat TLS modifi\u00e9",1608:"Jeu de certificats du serveur TLS",1609:"Certificat de serveur TLS Supprimer",1610:"Certificat racine s\u00e9curis\u00e9 TLS ajout\u00e9",
163 1611:"Suppression du certificat racine de confiance TLS",1612:"Jeu de cl\u00e9s pr\u00e9partag\u00e9es TLS",1613:"Param\u00e8tres Kerberos modifi\u00e9s",1614:"Cl\u00e9 principale Kerberos modifi\u00e9e",1615:"R\u00e9initialisation des compteurs d'usure du flash",1616:"Groupe d'alimentation modifi\u00e9",1617:"D\u00e9finir le mode d'authentification du domaine",1618:"Mettre \u00e0 niveau le client en mode de contr\u00f4le administrateur",1619:"D\u00e9provisionnement d\u00e9marr\u00e9",1700:"Mise sous tension effectu\u00e9e",
164 -1701:"Mise hors tension effectu\u00e9e",1702:"Cycle d'alimentation ex\u00e9cut\u00e9",1703:"R\u00e9initialisation effectu\u00e9e",1704:"D\u00e9finir les options de d\u00e9marrage",1800:"Ouverture de la session IDER",1801:"Session IDER ferm\u00e9e",1802:"IDER activ\u00e9",1803:"IDER d\u00e9sactiv\u00e9",1804:"Ouverture de la session SoL",1805:"Session SoL ferm\u00e9e",1806:"SoL activ\u00e9",1807:"SoL d\u00e9sactiv\u00e9",1808:"Session KVM d\u00e9marr\u00e9e",1809:"Session KVM termin\u00e9e",1810:"KVM activ\u00e9",
165 -1811:"KVM d\u00e9sactiv\u00e9",1812:"Le mot de passe VNC a \u00e9chou\u00e9 3 fois",1900:"Mise \u00e0 jour du firmware",1901:"\u00c9chec de la mise \u00e0 jour du firmware",2E3:"Journal d'audit de s\u00e9curit\u00e9 effac\u00e9",2001:"Politique d'audit de s\u00e9curit\u00e9 modifi\u00e9e",2002:"Journal d'audit de s\u00e9curit\u00e9 d\u00e9sactiv\u00e9",2003:"Journal d'audit de s\u00e9curit\u00e9 activ\u00e9",2004:"Journal d'audit de s\u00e9curit\u00e9 export\u00e9",2005:"Journal d'audit de s\u00e9curit\u00e9 r\u00e9cup\u00e9r\u00e9",
166 -2100:"Intel&reg; ME Time Set",2200:"Ensemble de param\u00e8tres TCPIP",2201:"Ensemble de noms d'h\u00f4te",2202:"Ensemble de noms de domaine",2203:"Ensemble de param\u00e8tres VLAN",2204:"Ensemble de r\u00e8gles de liaison",2205:"Ensemble de param\u00e8tres IPv6",2300:"Ensemble d'attributs de stockage global",2301:"Stockage EACL modifi\u00e9",2302:"Stockage FPACL modifi\u00e9",2303:"Op\u00e9ration d'\u00e9criture de stockage",2400:"Alerte abonn\u00e9e",2401:"Alerte d\u00e9sinscription",2402:"Journal des \u00e9v\u00e9nements effac\u00e9",
167 -2403:"Journal des \u00e9v\u00e9nements gel\u00e9",2500:"Filtre CB ajout\u00e9",2501:"Filtre CB retir\u00e9",2502:"Politique CB ajout\u00e9e",2503:"Politique CB supprim\u00e9e",2504:"Ensemble de r\u00e8gles par d\u00e9faut CB",2505:"Jeu d'options heuristiques CB",2506:"\u00c9tat heuristique CB effac\u00e9",2600:"Agent de surveillance ajout\u00e9",2601:"Agent de surveillance supprim\u00e9",2602:"Ensemble d'actions Agent Watchdog",2700:"Profil sans fil ajout\u00e9",2701:"Profil sans fil supprim\u00e9",
168 -2702:"Profil sans fil mis \u00e0 jour",2800:"EAC Posture Signer SET",2801:"EAC activ\u00e9",2802:"EAC d\u00e9sactiv\u00e9",2803:"\u00c9tat de posture de l'EAC",2804:"Options de configuration EAC",2900:"Activation KVM activ\u00e9e",2901:"Activation KVM d\u00e9sactiv\u00e9e",2902:"Mot de passe KVM modifi\u00e9",2903:"Consentement KVM r\u00e9ussi",2904:"\u00c9chec du consentement KVM",3E3:"Modification de la politique d'adh\u00e9sion",3001:"Envoyer un \u00e9v\u00e9nement de code de consentement",3002:"D\u00e9marrer l'\u00e9v\u00e9nement bloqu\u00e9 par opt-in"};
169 -h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acc\u00e8s ME invalide","Acc\u00e8s MEBx non valide"][b.charCodeAt(0)];if(1606==a){var c=["d\u00e9sactiv\u00e9","Activ\u00e9e"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\u00c9loign\u00e9"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth",
170 -"ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","d\u00e9sactiv\u00e9"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN distant"][b.charCodeAt(0)]:1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u00e0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==
171 -a?"De"+["Aucun","KVM","Tout"][b.charCodeAt(0)]+" \u00e0"+["Aucun","KVM","Tout"][b.charCodeAt(1)]:3001==a?["Succ\u00e8s","\u00c9chec 3 fois"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
164 +1701:"Mise hors tension effectu\u00e9e",1702:"Cycle d'alimentation ex\u00e9cut\u00e9",1703:"R\u00e9initialisation effectu\u00e9e",1704:"D\u00e9finir les options de d\u00e9marrage",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"Ouverture de la session IDER",1801:"Session IDER ferm\u00e9e",1802:"IDER activ\u00e9",1803:"IDER d\u00e9sactiv\u00e9",1804:"Ouverture de la session SoL",
165 +1805:"Session SoL ferm\u00e9e",1806:"SoL activ\u00e9",1807:"SoL d\u00e9sactiv\u00e9",1808:"Session KVM d\u00e9marr\u00e9e",1809:"Session KVM termin\u00e9e",1810:"KVM activ\u00e9",1811:"KVM d\u00e9sactiv\u00e9",1812:"Le mot de passe VNC a \u00e9chou\u00e9 3 fois",1900:"Mise \u00e0 jour du firmware",1901:"\u00c9chec de la mise \u00e0 jour du firmware",2E3:"Journal d'audit de s\u00e9curit\u00e9 effac\u00e9",2001:"Politique d'audit de s\u00e9curit\u00e9 modifi\u00e9e",2002:"Journal d'audit de s\u00e9curit\u00e9 d\u00e9sactiv\u00e9",
166 +2003:"Journal d'audit de s\u00e9curit\u00e9 activ\u00e9",2004:"Journal d'audit de s\u00e9curit\u00e9 export\u00e9",2005:"Journal d'audit de s\u00e9curit\u00e9 r\u00e9cup\u00e9r\u00e9",2100:"Intel&reg; ME Time Set",2200:"Ensemble de param\u00e8tres TCPIP",2201:"Ensemble de noms d'h\u00f4te",2202:"Ensemble de noms de domaine",2203:"Ensemble de param\u00e8tres VLAN",2204:"Ensemble de r\u00e8gles de liaison",2205:"Ensemble de param\u00e8tres IPv6",2300:"Ensemble d'attributs de stockage global",2301:"Stockage EACL modifi\u00e9",
167 +2302:"Stockage FPACL modifi\u00e9",2303:"Op\u00e9ration d'\u00e9criture de stockage",2400:"Alerte abonn\u00e9e",2401:"Alerte d\u00e9sinscription",2402:"Journal des \u00e9v\u00e9nements effac\u00e9",2403:"Journal des \u00e9v\u00e9nements gel\u00e9",2500:"Filtre CB ajout\u00e9",2501:"Filtre CB retir\u00e9",2502:"Politique CB ajout\u00e9e",2503:"Politique CB supprim\u00e9e",2504:"Ensemble de r\u00e8gles par d\u00e9faut CB",2505:"Jeu d'options heuristiques CB",2506:"\u00c9tat heuristique CB effac\u00e9",
168 +2600:"Agent de surveillance ajout\u00e9",2601:"Agent de surveillance supprim\u00e9",2602:"Ensemble d'actions Agent Watchdog",2700:"Profil sans fil ajout\u00e9",2701:"Profil sans fil supprim\u00e9",2702:"Profil sans fil mis \u00e0 jour",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC activ\u00e9",2802:"EAC d\u00e9sactiv\u00e9",2803:"\u00c9tat de posture de l'EAC",
169 +2804:"Options de configuration EAC",2900:"Activation KVM activ\u00e9e",2901:"Activation KVM d\u00e9sactiv\u00e9e",2902:"Mot de passe KVM modifi\u00e9",2903:"Consentement KVM r\u00e9ussi",2904:"\u00c9chec du consentement KVM",3E3:"Modification de la politique d'adh\u00e9sion",3001:"Envoyer un \u00e9v\u00e9nement de code de consentement",3002:"D\u00e9marrer l'\u00e9v\u00e9nement bloqu\u00e9 par opt-in",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
170 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Acc\u00e8s ME invalide","Acc\u00e8s MEBx non valide"][b.charCodeAt(0)];if(1606==a){var c=["d\u00e9sactiv\u00e9","Activ\u00e9e"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\u00c9loign\u00e9"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth",
171 +"ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","d\u00e9sactiv\u00e9"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN distant"][b.charCodeAt(0)]:1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u00e0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==
172 +a?"De"+["Aucun","KVM","Tout"][b.charCodeAt(0)]+" \u00e0"+["Aucun","KVM","Tout"][b.charCodeAt(1)]:3001==a?["Succ\u00e8s","\u00c9chec 3 fois"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
173 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
174 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
175 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
176 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
177 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
177 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
178 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
179 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
180 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
181 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
182 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
183 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
184 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
185 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
178 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
179 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
180 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
181 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
182 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
183 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
184 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
185 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
186 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
187 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
188 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
189 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -193,10 +194,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
194 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
195 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
196 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
196 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
197 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
198 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
198 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
199 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
199 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
200 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
201 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
202 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
203 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -206,69 +207,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
207 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
208 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
209 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
209 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
210 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
211 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
212 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
213 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
214 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
215 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
216 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
210 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
211 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
212 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
213 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
214 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
215 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
216 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
217 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
218 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
218 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
219 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
220 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
221 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
222 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
223 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
224 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
225 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
226 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
227 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
228 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
229 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
230 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
231 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
219 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
220 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
221 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
222 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
223 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
224 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
225 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
226 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
227 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
228 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
229 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
230 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
231 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
232 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
233 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
234 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
235 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
236 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
236 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
237 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
238 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
237 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
238 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
239 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
240 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
241 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
242 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
243 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
244 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
244 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
245 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
246 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
247 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
248 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
249 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
250 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
251 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
245 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
246 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
247 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
248 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
249 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
250 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
251 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
252 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
253 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
254 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
255 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
255 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
256 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
257 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
258 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
259 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
260 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
261 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
262 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
263 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
264 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
265 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
266 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
267 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
256 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
257 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
258 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
259 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
260 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
261 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
262 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
263 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
264 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
265 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
266 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
267 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
268 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
269 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
269 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
270 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
271 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
270 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
271 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
272 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
273 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
274 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
275 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -282,213 +283,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
283 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
284 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
285 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
285 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
286 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
287 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
287 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
288 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
289 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
290 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
291 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
292 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
293 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
294 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
288 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
289 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
290 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
291 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
292 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
293 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
294 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
295 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
296 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
296 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
297 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
298 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
297 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
298 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
299 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
300 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
301 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
301 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
302 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
303 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
303 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
304 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
305 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
305 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
306 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
307 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
308 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
309 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
310 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
311 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
312 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
313 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
314 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
315 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
316 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
317 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
306 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
307 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
308 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
309 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
310 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
311 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
312 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
313 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
314 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
315 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
316 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
317 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
318 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
319 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
319 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
320 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
321 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
322 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
323 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
324 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
325 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
326 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
327 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
320 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
321 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
322 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
323 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
324 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
325 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
326 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
327 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
328 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
329 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
330 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
331 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
332 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
333 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
334 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
334 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
335 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
336 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
337 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
338 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
339 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
335 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
336 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
337 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
338 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
339 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
340 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
341 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
341 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
342 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
343 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
343 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
344 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
345 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
346 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
347 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
348 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
349 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
350 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
351 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
352 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
344 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
345 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
346 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
347 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
348 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
349 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
350 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
351 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
352 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
353 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
354 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
354 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
355 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
356 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
357 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
358 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
355 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
356 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
357 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
358 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
359 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
360 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
361 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
362 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
362 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
363 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
364 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
365 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
366 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
366 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
367 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
368 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
369 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
370 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
371 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
372 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
367 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
368 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
369 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
370 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
371 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
372 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
373 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
374 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
374 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
375 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
376 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
377 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
378 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
375 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
376 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
377 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
378 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
379 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
380 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
380 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
381 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
382 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
383 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
383 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
384 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
384 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
385 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
386 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
387 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
387 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
388 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
389 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
390 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
388 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
389 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
390 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
391 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
392 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
392 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
393 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
394 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
395 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
393 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
394 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
395 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
396 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
397 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
398 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
399 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
399 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
400 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
401 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
402 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
403 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
404 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
405 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
406 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
407 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
408 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
409 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
410 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
400 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
401 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
402 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
403 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
404 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
405 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
406 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
407 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
408 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
409 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
410 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
411 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
412 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
412 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
413 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
414 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
413 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
414 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
415 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
416 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
416 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
417 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
418 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
419 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
420 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
417 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
418 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
419 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
420 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
421 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
422 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
422 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
423 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
424 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
424 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
425 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
426 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
425 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
426 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
427 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
428 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
428 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
429 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
430 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
431 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
432 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
433 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
434 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
435 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
436 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
437 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
438 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
439 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
440 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
441 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
442 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
443 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
444 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
445 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
446 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
429 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
430 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
431 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
432 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
433 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
434 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
435 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
436 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
437 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
438 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
439 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
440 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
441 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
442 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
443 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
444 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
445 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
446 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
447 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
448 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
448 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
449 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
450 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
450 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
451 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
452 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
453 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
453 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
454 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
455 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
456 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
457 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
458 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
459 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
460 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
461 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
462 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
463 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
464 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
465 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
466 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
467 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
468 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
469 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
454 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
455 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
456 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
457 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
458 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
459 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
460 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
461 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
462 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
463 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
464 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
465 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
466 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
467 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
468 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
469 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
470 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
471 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
472 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
473 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
473 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
474 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
475 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
474 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
475 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
476 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
477 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
477 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
478 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
479 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
480 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
481 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
482 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
483 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
484 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
484 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
485 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
486 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
487 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
485 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
486 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
487 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
488 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
489 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
489 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
490 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
491 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
490 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
491 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
492 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
493 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
494 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
495 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -506,111 +507,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
507 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
508 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
509 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
509 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
510 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
511 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
512 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
510 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
511 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
512 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
513 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
514 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
514 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
515 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
516 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
517 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
518 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
515 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
516 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
517 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
518 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
519 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
520 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
520 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
521 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
522 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
523 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
524 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
524 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
525 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
525 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
526 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
527 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
528 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
529 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
529 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
530 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
531 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
532 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
533 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
534 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
535 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
536 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
536 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
537 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
538 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
538 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
539 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
540 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
541 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
542 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
543 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
544 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
545 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
539 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
540 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
541 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
542 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
543 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
544 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
545 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
546 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
547 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
548 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
548 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
549 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
550 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
550 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
551 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
552 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
552 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
553 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
554 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
555 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
556 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
557 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
558 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
559 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
553 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
554 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
555 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
556 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
557 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
558 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
559 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
560 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
561 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
562 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
562 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
563 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
564 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
565 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
566 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
563 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
564 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
565 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
566 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
567 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
568 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
568 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
569 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
570 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
571 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
572 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
573 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
574 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
575 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
576 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
577 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
578 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
579 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
580 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
581 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
582 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
583 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
569 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
570 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
571 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
572 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
573 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
574 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
575 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
576 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
577 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
578 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
579 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
580 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
581 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
582 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
583 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
584 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
585 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
585 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
586 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
587 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
588 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
589 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
590 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
586 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
587 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
588 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
589 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
590 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
591 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
592 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
593 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
593 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
594 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
594 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
595 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
596 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
596 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
597 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
598 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
598 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
599 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
600 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
601 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
602 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
603 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
599 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
600 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
601 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
602 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
603 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
604 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
605 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
605 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
606 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
607 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
606 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
607 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
608 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
609 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
610 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
611 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
612 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
613 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
613 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
614 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
615 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
616 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
617 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -621,20 +622,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
622 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
623 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
624 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
624 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
625 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
625 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
626 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
627 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
627 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
628 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
628 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
629 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
630 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
631 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
631 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
632 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
633 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
634 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
635 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
636 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
636 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
637 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
637 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
638 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
639 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
640 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
641 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -643,20 +644,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
644 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
645 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
646 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
646 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
647 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
648 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
649 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
650 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
651 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
651 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
652 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
653 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
654 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
655 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
656 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
652 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
653 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
654 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
655 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
656 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
657 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
658 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
658 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
659 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
659 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
660 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
661 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
662 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
663 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -680,17 +681,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
681 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
682 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
683 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
683 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
684 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
685 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
686 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
684 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
685 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
686 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
687 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
688 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
689 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
690 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
691 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
692 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
692 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
693 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
693 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
694 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
695 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
696 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
697 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -706,48 +707,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
707 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
708 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
709 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
709 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
710 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
711 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
712 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
713 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
714 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
715 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
716 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
716 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
717 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
718 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
719 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
720 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
720 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
721 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
722 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
722 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
723 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
724 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
725 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
725 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
726 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
727 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
728 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
729 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
730 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
730 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
731 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
732 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
733 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
731 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
732 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
733 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
734 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
735 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
736 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
737 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
738 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
739 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
739 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
740 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
741 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
741 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
742 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
743 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
742 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
743 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
744 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
745 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
746 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
747 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
747 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
748 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
749 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
749 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
750 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
750 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
751 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
752 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
753 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
754 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -755,119 +756,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
756 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
757 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
758 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
758 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
759 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
760 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
761 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
762 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
763 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
764 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
765 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
766 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
767 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
768 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
769 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
770 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
771 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
772 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
773 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
774 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
775 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
776 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
777 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
778 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
779 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
780 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
781 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
782 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
783 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
784 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
785 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
786 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
787 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
788 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
789 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
790 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
791 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
792 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
793 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
794 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
795 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
796 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
797 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
798 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
799 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
800 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
801 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
802 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
803 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
804 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
805 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
806 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
807 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
808 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
809 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
810 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
811 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
812 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
813 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
814 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
815 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
816 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
817 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
818 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
819 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
820 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
821 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
822 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
823 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
824 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
825 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
826 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
827 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
828 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
829 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
830 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
831 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
832 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
833 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
834 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
835 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
836 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
837 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
838 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
839 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
840 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
841 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
842 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
843 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
844 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
845 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
846 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
847 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
848 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
849 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
850 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
851 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
852 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
759 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
760 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
761 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
762 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
763 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
764 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
765 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
766 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
767 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
768 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
769 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
770 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
771 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
772 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
773 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
774 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
775 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
776 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
777 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
778 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
779 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
780 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
781 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
782 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
783 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
784 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
785 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
786 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
787 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
788 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
789 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
790 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
791 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
792 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
793 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
794 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
795 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
796 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
797 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
798 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
799 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
800 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
801 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
802 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
803 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
804 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
805 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
806 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
807 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
808 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
809 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
810 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
811 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
812 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
813 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
814 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
815 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
816 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
817 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
818 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
819 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
820 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
821 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
822 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
823 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
824 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
825 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
826 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
827 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
828 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
829 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
830 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
831 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
832 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
833 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
834 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
835 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
836 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
837 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
838 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
839 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
840 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
841 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
842 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
843 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
844 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
845 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
846 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
847 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
848 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
849 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
850 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
851 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
852 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
853 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
854 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
855 +l.Init();return l},ZLIB=ZLIB||{};
856 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
857 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
855 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
856 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
857 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
858 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
859 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
860 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
861 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
859 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
860 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
862 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
863 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
864 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
865 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
863 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
864 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
865 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
866 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
866 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
867 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
868 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
869 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
870 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
871 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
869 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
870 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
872 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
873 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
874 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
875 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
876 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -889,22 +892,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
892 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
893 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
894 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
892 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
893 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
894 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
895 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
896 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
895 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
896 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
897 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
898 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
899 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
900 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
901 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
902 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
903 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
904 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
902 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
903 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
905 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
906 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
907 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
905 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
906 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
907 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
908 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
909 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
910 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
911 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
912 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
913 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -920,16 +923,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
923 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
924 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
925 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
923 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
924 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
925 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
926 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
927 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
928 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
929 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
926 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
927 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
928 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
929 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
930 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
931 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
932 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
933 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
931 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
932 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Chargement...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
934 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
935 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Chargement...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
936 StatusStrs=["D\u00e9branch\u00e9","De liaison...","Installer...","Li\u00e9"],t,t2,rsepass=null;
937 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
938 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -963,15 +966,15 @@ var DMTFPowerStates=";;Allumer;Sommeil l\u00e9ger;Sommeil profond;Cycle d'alimen
966 function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Inconnue</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Allumer"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
967 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Branch\u00e9",", Sur la batterie"][v.PowerSource]);d+=TableEntry("Puissance",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Aucun</i>":EscapeHtml(c);d+=TableEntry("Nom et domaine",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
968 d+=TableEntry("ID syst\u00e8me",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID syst\u00e8me",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" activ\u00e9 en mode de contr\u00f4le administrateur (ACM)",4==l.ProvisioningMode&&(n=" activ\u00e9 en mode de contr\u00f4le client (CCM)",
966 -b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=
967 -amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
968 -6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+=", Port de redirection");q&&(e+=", S\u00e9rie sur LAN");n&&(e+=", IDE-Redirect");h&&(e+=", KVM");""==e&&(e=" Aucun");d+=TableEntry("Fonctionnalit\u00e9s actives",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Affichage principal",7<amtversion&&void 0!==
969 +b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=
970 +amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
971 +6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);q&&(e+=", Port de redirection");p&&(e+=", S\u00e9rie sur LAN");n&&(e+=", IDE-Redirect");g&&(e+=", KVM");""==e&&(e=" Aucun");d+=TableEntry("Fonctionnalit\u00e9s actives",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Affichage principal",7<amtversion&&void 0!==
972 n.DefaultScreen&&255>n.DefaultScreen&&(e=["Affichage principal","Affichage secondaire","3e affichage"][n.DefaultScreen]),e='<span title="'+format("L'affichage \u00e0 distance par d\u00e9faut est {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Port 5900 activ\u00e9"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"opt-in secondes":"deuxi\u00e8me opt-in")),e+=","+n.SessionTimeout+" minute"+(0<n.SessionTimeout?"s":"")+" expiration de la session",9<amtversion&&
970 -null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Masquage autoris\u00e9"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Bureau \u00e0 distance",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&
971 -null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u00c9tat inconnu",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="Non requis"),1==p&&(e="Requis pour KVM uniquement"),4294967295==p&&(e="Toujours requis"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentement de l'utilisateur",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=
973 +null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Masquage autoris\u00e9"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Bureau \u00e0 distance",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&
974 +null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u00c9tat inconnu",q=amtsysstate.IPS_OptInService.response.OptInRequired,0==q&&(e="Non requis"),1==q&&(e="Requis pour KVM uniquement"),4294967295==q&&(e="Toujours requis"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentement de l'utilisateur",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=
975 amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Inconnue",1:"Autre",2:"Activ\u00e9e",3:"d\u00e9sactiv\u00e9",4:"\u00c9teindre",5:"N'est pas applicable",6:"Activ\u00e9 mais hors ligne",7:"En test",8:"Diff\u00e9r\u00e9",9:"Au repos",10:"D\u00e9part",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:
973 -"Inconnue",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==
974 -p&&(d+=TableEntry("Politique d'alimentation",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Date et heure",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Actions de puissance ...","showPowerActionDlg()")+" ";e+=AddButton("Enregistrer l'\u00e9tat ...","saveEntireAmtState()")+
976 +"Inconnue",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==
977 +q&&(d+=TableEntry("Politique d'alimentation",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Date et heure",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Actions de puissance ...","showPowerActionDlg()")+" ";e+=AddButton("Enregistrer l'\u00e9tat ...","saveEntireAmtState()")+
978 " ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" La modification des param\u00e8tres r\u00e9seau peut rendre cette page indisponible.");d=d+"<br><h2>r\u00e9glages g\u00e9n\u00e9raux</h2>"+TableStart();
979 e="";"<i>Aucun</i>"!=c&&(1==v.SharedFQDN&&(e=", partag\u00e9 avec OS"),0==v.SharedFQDN&&(e=", diff\u00e9rent du syst\u00e8me d'exploitation"));d+=TableEntry("Nom et domaine",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="d\u00e9sactiv\u00e9";1==v.DDNSUpdateEnabled?c="Activ\u00e9 chacun"+v.DDNSPeriodicUpdateInterval+" minutes, TTL est"+v.DDNSTTL+" minutes":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Mise \u00e0 jour par serveur DHCP");d+=TableEntry("DNS dynamique",addLinkConditional(c,
980 "showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interface sans fil":"Interface filaire")+"</h2>";d+=TableStart();d+=TableEntry("\u00c9tat du lien",1==c.LinkIsUp?"Le lien est en place":"Le lien est en panne");if(c.LinkPolicy){c.LinkPolicy=
@@ -980,8 +983,8 @@ xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("Etat",addLinkCondi
983 (d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",
984 addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Activ\u00e9e":"d\u00e9sactiv\u00e9","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("R\u00e9pondre au ping",addLinkConditional(["d\u00e9sactiv\u00e9","R\u00e9ponse ICMP","R\u00e9ponse RMCP","R\u00e9ponse ICMP et RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),
985 e=1==c.DHCPEnabled?"Automatique \u00e0 l'aide du serveur DHCP":"Adresse IP statique",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("\u00c9tat IPv4",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Adresse IPv4",isIpAddress(c.IPAddress,"Aucun"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Passerelle / masque IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Aucun")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv4",
983 -e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="d\u00e9sactiv\u00e9",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Adresses activ\u00e9es, automatiques et manuelles":
984 -"Activ\u00e9, adresses automatiques");d+=TableEntry("\u00c9tat IPv6",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("Adresse IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=
986 +e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="d\u00e9sactiv\u00e9",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Adresses activ\u00e9es, automatiques et manuelles":
987 +"Activ\u00e9, adresses automatiques");d+=TableEntry("\u00c9tat IPv6",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("Adresse IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=
988 TableEntry("Adresse IPv6","Aucun");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Routeur par d\u00e9faut IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Serveur de nom de domaine IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),
989 0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
990 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
@@ -1029,8 +1032,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1032 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"d\u00e9sactiv\u00e9":"Activ\u00e9e",c&2&&(b+=", Ferm\u00e9 \u00e0 cl\u00e9"),c&4&&(b+=", Presque plein"),c&8&&(b+=", Plein"),c&16&&(b+=", NoKey"),c="<h1>Param\u00e8tres du journal d'audit</h1>"+TableStart(),c+=TableEntry("Etat",b),c+=TableEntry("Espace de rangement",a[0].CurrentNumberOfRecords+" enregistrement (s),"+a[0].PercentageFree+"% gratuit"),c+=TableEntry("\u00c9craser la politique",2==a[0].OverwritePolicy?"S'enveloppe lorsqu'il est plein":
1033 "N'\u00e9crase jamais"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1034 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtre" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Sauver...","SaveAuditLog()")+AddButton("Effacer le journal","ClearAuditLog()"))+"<br>");if(0==c.length)d="Aucun \u00e9v\u00e9nement de journal d'audit trouv\u00e9.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Temps</b><td class=r1 style=width:260px><b>Initiateur</b><td class=r1><b>Action</b>";
1032 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1033 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Journal d'audit Intel AMT",auditLog)}
1035 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1036 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Journal d'audit Intel AMT",auditLog)}
1037 function ClearAuditLog(b){QH(60,"Effacer le journal d'audit?");setDialogMode(1,"Journal d'audit",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1038 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Journal d'audit","Erreur: "+d)}
1039 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Temps",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiateur",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adresse",a.NetAddress));d+=addHtmlValue("Application",a.AuditApp);d+=addHtmlValue("un \u00e9v\u00e9nement",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Donn\u00e9es \u00e9tendues",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=
@@ -1083,7 +1086,7 @@ function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabi
1086 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Nombre maximum",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" chiens de garde");b+=TableEntry("Nombre total maximum d'actions",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" Actions");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les chiens de garde de pr\u00e9sence d'agent Intel&reg; AMT.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1087 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Aucun chien de garde de pr\u00e9sence d'agent n'a \u00e9t\u00e9 trouv\u00e9.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+
1088 c+')><input type=button style=float:right value="Ajouter une action ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Supprimer des actions ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);
1086 -v.actions&&1==v.actions[0].EventOnTransition&&(d+=": \u00c9v\u00e9nement \u00e0 consigner")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Ajouter un chien de garde ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1089 +v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \u00c9v\u00e9nement \u00e0 consigner")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Ajouter un chien de garde ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1090 function getWatchdogTransitionStr(b){if(31==b)return"N'importe quel \u00c9tat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1091 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("La description",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entit\u00e9 surveill\u00e9e",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u00c9tat actuel",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u00c9tat activ\u00e9",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervalle de d\u00e9marrage",
1092 b.StartupInterval+" seconde (s)");c+=addHtmlValue("Intervalle de temporisation",b.TimeoutInterval+" seconde (s)");setDialogMode(11,format("Chien de garde {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1178,7 +1181,7 @@ a.AccessPermission){2==v&&(n+="D\u00e9sactiv\u00e9,");var l=0;for(c in a.Realms)
1181 xxAccountAdminName&&(c+=AddButton("Nouveau compte","newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1182 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Modifier le compte",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1183 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nouveau compte",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1181 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erreur de compte","Param\u00e8tres invalides");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1184 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erreur de compte","Param\u00e8tres invalides");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1185 l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1186 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrateur</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1187 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Local seulement","R\u00e9seau uniquement","Tout (local et r\u00e9seau)"];
@@ -1196,8 +1199,8 @@ b+".txt")}delete terminal.m.capture;c3.value="Commencer la capture"}}function te
1199 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1200 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1201 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1199 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1200 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1202 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1203 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1204 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1205 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1206 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1208,14 +1211,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1211 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1212 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1213 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Relier":"D\u00e9connecter";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Bureau \u00e0 distance","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Bureau \u00e0 distance","The device indicated that this type of connection of not supported."):
1211 -5E4==b.disconnectCode?messagebox("Bureau \u00e0 distance","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1212 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Param\u00e8tres du bureau \u00e0 distance",3,showDesktopSettingsChanged))}
1214 +5E4==b.disconnectCode?messagebox("Bureau \u00e0 distance","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Bureau \u00e0 distance","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1215 +break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1216 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Param\u00e8tres du bureau \u00e0 distance",3,showDesktopSettingsChanged))}
1217 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1218 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1215 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1216 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1217 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1218 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1219 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1220 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1221 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1222 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1223 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1224 "8px"),center()))}
1225 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Entr\u00e9e clavier \u00e0 distance",3,showDeskTypeEx,"<div>Saisissez le texte et cliquez sur OK pour le taper \u00e0 distance \u00e0 l'aide d'un clavier anglais am\u00e9ricain. Assurez-vous de placer le curseur distant \u00e0 la bonne position avant de continuer.<div><textarea id=d2typeText style=\"margin-top:5px;width:100%;height:184px;resize:none\" maxlength=2000></textarea>"),Q("d2typeText").focus())}
@@ -1226,13 +1230,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1230 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1231 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1232 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1229 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1233 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1234 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1235 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1236 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1233 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Racine</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1234 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1235 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1237 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Racine</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1238 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1239 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1240 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1241 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1242 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1356,10 +1360,10 @@ function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_
1360 2&&addOption("d5actionSelect","Allumez PXE",401);addOption("d5actionSelect","Action personnalis\u00e9e ...",999);5<amtversion&&addOption("d5actionSelect","Consentement de l'utilisateur ...",998);setDialogMode(5,"Actions de puissance",3,powerActionDlgCheck)}else messagebox("Action de puissance",format("Impossible d'obtenir les capacit\u00e9s du syst\u00e8me, erreur {0}",d))}
1361 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"Action de puissance termin\u00e9e."):QH(60,format("Erreur d'action d'alimentation # {0}.",e));setDialogMode(1,"Action de puissance",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirmer l'ex\u00e9cution d'Intel&reg; Remote Secure Erase?<br>Saisissez le mot de passe d'effacement s\u00e9curis\u00e9 si n\u00e9cessaire.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Mot de passe</div></div><br><div style=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>",
1362 rsepass=1,setDialogMode(11,"Actions de puissance",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1359 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1360 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1361 -a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Actions de puissance",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1362 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1363 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVERTISSEMENT: </b> Cela effacera les donn\u00e9es sur le syst\u00e8me distant.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&
1364 +a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));
1365 +c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Actions de puissance",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}
1366 +var platfromEraseTLV=null;
1367 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1368 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Action de puissance","V\u00e9rification de l'\u00e9tat ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=
1369 !1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1394,10 +1398,10 @@ function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"Action de puissance termi
1398 function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1399 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1400 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1397 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1398 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez le stockage Intel&reg; AMT pour cet ordinateur.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1399 -" / "+p):e+"Racine";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("T\u00e9l\u00e9charger","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" octets</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==
1400 -q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Aucun fichier trouv\u00e9.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1401 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1402 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez le stockage Intel&reg; AMT pour cet ordinateur.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+
1403 +" / "+q):e+"Racine";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("T\u00e9l\u00e9charger","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" octets</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==
1404 +p&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Aucun fichier trouv\u00e9.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+
1405 (v?AddButton("T\u00e9l\u00e9charger...","UploadToStorage()"):""));QH(55,a)}else QH(55,"Impossible de charger les donn\u00e9es de stockage ...<br/>"+AddButton("Rafra\u00eechir","PullStorage()"))}
1406 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Vendeur",b));""!=c&&(e+=addHtmlValue("Application",c));e+=addHtmlValue("Nom",a);e+=addHtmlValue("Taille",v.size+" bytes");v.link&&(e+=addHtmlValue("Lien",v.link));setDialogMode(11,"Article de stockage",5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1407 function storageDeleteResponse(b,c){200!=c?messagebox("Espace de rangement",format("Impossible de supprimer le fichier (ERR {0}), v\u00e9rifiez que l'ordinateur est sous tension.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}
@@ -1412,7 +1416,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1416 b}
1417 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1418 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1415 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," journ\u00e9es").replace("H"," heures").replace("M"," minutes");b=b.replace(" 1 jour"," Un jour").replace(" 1 heure"," 1 heure").replace(" 1 minutes"," 1 minute");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1419 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," journ\u00e9es").replace("H"," heures").replace("M"," minutes");b=b.replace(" 1 jour"," Un jour").replace(" 1 heure"," 1 heure").replace(" 1 minutes "," 1 minute ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1420 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>G\u00e9rez les alarmes de r\u00e9veil.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, r\u00e9veiller sur "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u00e0"),void 0!=d[c].Interval&&(a+=" et chacun"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&
1421 (a+=", supprimer une fois termin\u00e9"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u00c9diter...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Aucune alarme de r\u00e9veil enregistr\u00e9e.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Supprimer toutes les alarmes",
1422 "RemoveAllAlarms()")+AddButton("Ajouter","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-it.htm
+622 -619
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="it" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Collegare onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Stato del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Desktop remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>File</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informazioni hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro eventi</a><p id=go15 class=nav1 onclick=go(15)><a>Registro di audizione</a><p id=go21 class=nav1 onclick=go(21)><a>Conservazione</a><p id=go8 class=nav1 onclick=go(8)><a>Impostazioni di rete</a><p id=go17 class=nav1 onclick=go(17)><a>Impostazioni Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Impostazioni sicurezza</a><p id=go19 class=nav1 onclick=go(19)><a>Presenza agente</a><p id=go18 class=nav1 onclick=go(18)><a>Difesa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Profili utente</a><p id=go22 class=nav1 onclick=go(22)><a>Sottoscrizioni</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Browser WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mappa del disco" onclick=iderToggleDiskMap()><input type=button value="Interrompi sessione IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, i blocchi sono 512 byte.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, i blocchi sono 2048 byte.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Il firmware di questo computer dovrebbe essere aggiornato,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>per favore controlla qui</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Caricamento in corso...</h1></div><div id=p1 style=display:none><h1>Stato del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informazioni hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro eventi</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Impostazioni di rete</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Profili utente</h1><span id=21></span></div><div id=p12 style=display:none><h1>Browser WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=domanda style=margin:4px onclick=wsmanQuery()><input type=button value=Chiaro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminale seriale su LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità Serial-over-LAN è disabilitata<span id=26>, fai clic qui per abilitarlo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Avvia acquisizione" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Collegare onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Cambia ciò che invierà il tasto invio" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Attiva / disattiva le dimensioni del terminale" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambia il tipo di emulazione dei tasti da F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii esteso" title="Attiva / disattiva il tipo di emulazione terminale" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Incolla disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Desktop remoto</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità KVM è disabilitata<span id=37>, fai clic qui per abilitarlo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Gira a sinistra" onclick=drotate(-1)>↺</div><div class=rb title="Ruota a destra" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Attiva / disattiva la modalità a schermo intero" onkeypress="return false" onkeydown="return false" value=Pieno onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salva uno screenshot del desktop remoto" onkeypress="return false" onkeydown="return false" value=Salva... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Impostazioni... title="Modifica le impostazioni del desktop remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambia lo stato di alimentazione della macchina remota" onkeypress="return false" onkeydown="return false" value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Collegare onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Disconnected.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Vincere<option value=1>Win + Giù<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Sinistra<option value=24>Win + Destra<option value=5>Maiusc + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=genere onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Schermo nero&nbsp;</span><span id=47><input id=48 type=checkbox>Visualizzare solamente&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Registro di audizione</h1><span id=50></span></div><div id=p16 style=display:none><h1>Impostazioni sicurezza</h1><span id=51></span></div><div id=p17 style=display:none><h1>Impostazioni Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Difesa del sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presenza agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Conservazione</h1><span id=55></span></div><div id=p22 style=display:none><h1>Abbonamenti ad eventi</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>File</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Su>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleziona tutto" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rinominare onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Elimina onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nuova cartella" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Caricare onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Taglio onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=copia onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Incolla onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=ricaricare onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordina per nome<option value=2>Ordina per dimensione<option value=3>Ordinare per data<option value=4>Scendi per nome<option value=5>Scendi per dimensione<option value=6>Scendi per data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nome utente</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Parola d'ordine*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>conferma password</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Locale<option value=1>Rete<option value=2>Qualunque</select><div>Autorizzazione</div></div><div>Autorizzazioni concesse</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Minimo 8 caratteri con maiuscolo, minuscolo, 0-9 e uno di! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Azione di potere</div></div><div><span style=color:red>Avvertimento:</span>Alcune azioni energetiche possono causare la perdita di dati e la disconnessione delle sessioni di reindirizzamento del desktop, del terminale o del disco.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Codice di consenso</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Display principale<option value=1>Display secondario<option id=d6ThirdDisplay value=2 style=display:none>Terzo display</select><div>Visualizzazione del consenso</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codifica immagine</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Mostra cursore del mouse locale</label><br><label><input type=checkbox id=d7showcad>Mostra Ctrl-Alt-Canc</label><br><label><input type=checkbox id=d7limitFrameRate>Frame rate limite</label><br><label><input type=checkbox id=d7noMouseRotate>Non ruotare il mouse</label><br></div><div>Altre impostazioni</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualità</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>scalata</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Admin style=float:right;width:220px><div style=height:20px>Nome utente</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Parola d'ordine</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta di reindirizzamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Desktop remoto KVM</label><label style=display:block><input type=checkbox id=c17>IDE-reindirizzamento<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non richiesto<br></label><label><input type=radio name=d10 id=c20 value=1>Richiesto solo per KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre richiesto<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">Nome del profilo</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorità</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Autenticazione</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Nessuna</select><div>crittografia</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">Parola d'ordine*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">conferma password</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Ciò salverà l'intero stato di Intel® AMT per questa macchina in un file. Le password non verranno salvate, ma potrebbero essere inclusi alcuni dati sensibili.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabilitato<br><input type=radio name=d20 id=d20b value=1>Risposta ICMP<br><input type=radio name=d20 id=d20c value=2>Risposta RMCP<br><input type=radio name=d20 id=d20d value=3>Risposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronizzazione dell'indirizzo IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>indirizzo IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Contrassegno di sottorete</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>porta</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabilitato<option value=1>Disabilitato, aggiornamento DHCP<option value=2>Abilitato</select><div>Client DNS dinamico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervallo di aggiornamento (minuti)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (secondi)</div></div><div style=font-size:10px><br>L'intervallo di defaut è di 1440 minuti, il TTL predefinito è di 900 secondi.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Accendere<option value=10>Ripristina<option value=5>Ciclo di alimentazione<option value=8>Spegnere<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>Risparmio energetico del sistema operativo<option value=999>Imposta le opzioni di avvio</select><div>Comando remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Applica avvio sicuro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Impostazioni del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forza eventi di avanzamento</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Blocca il pulsante di accensione</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Pulsante di reset del blocco</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Pulsante di blocco del sonno</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Blocca tastiera</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Bypass password BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modalità sicura</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Usa IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Impostazioni di avvio</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nessuna<option id=ForceDVDBootOption value=1>Forza avvio CD / DVD<option id=ForcePXEBootOption value=2>Forza avvio PXE<option id=ForceHDBootOption value=3>Forza l'avvio del disco rigido<option id=ForceDiagBootOption value=4>Forza avvio diagnostico</select><div>Boot Source</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nessuna<option value=1>Indice 1<option value=2>Indice 2<option value=3>Indice 3<option value=3>Indice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Avvio da floppy<option value=1>Avvia su CD-ROM</select><div>Dispositivo di avvio IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Default del sistema<option id=c46 value=1>Silenzioso<option id=c47 value=2>verboso<option id=c48 value=3>Schermo nero</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Password RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nome dell'allarme</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Data di sveglia (anno-mese-giorno)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Tempo di sveglia (ora: min: sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervallo (giorni-ore-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Mantieni l'allarme<option value=1>Elimina al completamento</select></div><div style=padding-top:4px>Dopo la veglia</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Abilitato<br></label><label><input type=radio name=d26b id=c50 value=0>Disabilitato<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Abilitato<br></label><label><input type=radio name=d26a id=c52 value=0>Disabilitato<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Annulla style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=ok style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Elimina style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="it" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Collegare onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Stato del sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Desktop remoto</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>File</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informazioni hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro eventi</a><p id=go15 class=nav1 onclick=go(15)><a>Registro di audizione</a><p id=go21 class=nav1 onclick=go(21)><a>Conservazione</a><p id=go8 class=nav1 onclick=go(8)><a>Impostazioni di rete</a><p id=go17 class=nav1 onclick=go(17)><a>Impostazioni Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Impostazioni sicurezza</a><p id=go19 class=nav1 onclick=go(19)><a>Presenza agente</a><p id=go18 class=nav1 onclick=go(18)><a>Difesa del sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Profili utente</a><p id=go22 class=nav1 onclick=go(22)><a>Sottoscrizioni</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Browser WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mappa del disco" onclick=iderToggleDiskMap()><input type=button value="Interrompi sessione IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, i blocchi sono 512 byte.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CD-ROM, i blocchi sono 2048 byte.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Il firmware di questo computer dovrebbe essere aggiornato,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>per favore controlla qui</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Caricamento in corso...</h1></div><div id=p1 style=display:none><h1>Stato del sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informazioni hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro eventi</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Impostazioni di rete</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Profili utente</h1><span id=21></span></div><div id=p12 style=display:none><h1>Browser WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=domanda style=margin:4px onclick=wsmanQuery()><input type=button value=Chiaro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminale seriale su LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità Serial-over-LAN è disabilitata<span id=26>, fai clic qui per abilitarlo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Avvia acquisizione" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Collegare onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Cambia ciò che invierà il tasto invio" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Attiva / disattiva le dimensioni del terminale" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Cambia il tipo di emulazione dei tasti da F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii esteso" title="Attiva / disattiva il tipo di emulazione terminale" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Incolla disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Desktop remoto</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>La porta di reindirizzamento Intel® AMT o la funzionalità KVM è disabilitata<span id=37>, fai clic qui per abilitarlo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Il computer remoto non è acceso, fare clic qui per emettere un comando di accensione.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Gira a sinistra" onclick=drotate(-1)>↺</div><div class=rb title="Ruota a destra" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Attiva / disattiva la modalità a schermo intero" onkeypress="return false" onkeydown="return false" value=Pieno onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salva uno screenshot del desktop remoto" onkeypress="return false" onkeydown="return false" value=Salva... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Impostazioni... title="Modifica le impostazioni del desktop remoto" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Inizia l'operazione di montaggio del disco remoto" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Cambia lo stato di alimentazione della macchina remota" onkeypress="return false" onkeydown="return false" value="Azioni di potere ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Collegare onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Disconnected.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Vincere<option value=1>Win + Giù<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Sinistra<option value=24>Win + Destra<option value=5>Maiusc + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Spedire onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=genere onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Schermo nero&nbsp;</span><span id=47><input id=48 type=checkbox>Visualizzare solamente&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Registro di audizione</h1><span id=50></span></div><div id=p16 style=display:none><h1>Impostazioni sicurezza</h1><span id=51></span></div><div id=p17 style=display:none><h1>Impostazioni Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Difesa del sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presenza agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Conservazione</h1><span id=55></span></div><div id=p22 style=display:none><h1>Abbonamenti ad eventi</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>File</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Su>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Seleziona tutto" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rinominare onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Elimina onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nuova cartella" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Caricare onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Taglio onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=copia onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Incolla onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=ricaricare onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Ordina per nome<option value=2>Ordina per dimensione<option value=3>Ordinare per data<option value=4>Scendi per nome<option value=5>Scendi per dimensione<option value=6>Scendi per data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nome utente</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Parola d'ordine*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>conferma password</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Locale<option value=1>Rete<option value=2>Qualunque</select><div>Autorizzazione</div></div><div>Autorizzazioni concesse</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Minimo 8 caratteri con maiuscolo, minuscolo, 0-9 e uno di! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Azione di potere</div></div><div><span style=color:red>Avvertimento:</span>Alcune azioni energetiche possono causare la perdita di dati e la disconnessione delle sessioni di reindirizzamento del desktop, del terminale o del disco.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Codice di consenso</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Display principale<option value=1>Display secondario<option id=d6ThirdDisplay value=2 style=display:none>Terzo display</select><div>Visualizzazione del consenso</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codifica immagine</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Disabilitato<option value=2>Automatic<option value=3>Abilitato</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostra cursore del mouse locale</label><br><label><input type=checkbox id=d7showcad>Mostra Ctrl-Alt-Canc</label><br><label><input type=checkbox id=d7limitFrameRate>Frame rate limite</label><br><label><input type=checkbox id=d7noMouseRotate>Non ruotare il mouse</label><br></div><div>Altre impostazioni</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualità</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>scalata</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=Admin style=float:right;width:220px><div style=height:20px>Nome utente</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Parola d'ordine</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta di reindirizzamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Desktop remoto KVM</label><label style=display:block><input type=checkbox id=c17>IDE-reindirizzamento<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Non richiesto<br></label><label><input type=radio name=d10 id=c20 value=1>Richiesto solo per KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre richiesto<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">Nome del profilo</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Massimo 32 caratteri"><div title="Massimo 32 caratteri">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priorità</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Autenticazione</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Nessuna</select><div>crittografia</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">Parola d'ordine*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lunghezza tra 8 e 63 caratteri"><div title="Lunghezza tra 8 e 63 caratteri">conferma password</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Ciò salverà l'intero stato di Intel® AMT per questa macchina in un file. Le password non verranno salvate, ma potrebbero essere inclusi alcuni dati sensibili.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabilitato<br><input type=radio name=d20 id=d20b value=1>Risposta ICMP<br><input type=radio name=d20 id=d20c value=2>Risposta RMCP<br><input type=radio name=d20 id=d20d value=3>Risposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronizzazione dell'indirizzo IP del sistema operativo</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>indirizzo IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Contrassegno di sottorete</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>porta</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primario</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabilitato<option value=1>Disabilitato, aggiornamento DHCP<option value=2>Abilitato</select><div>Client DNS dinamico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervallo di aggiornamento (minuti)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (secondi)</div></div><div style=font-size:10px><br>L'intervallo di defaut è di 1440 minuti, il TTL predefinito è di 900 secondi.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Accendere<option value=10>Ripristina<option value=5>Ciclo di alimentazione<option value=8>Spegnere<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>Risparmio energetico del sistema operativo<option value=999>Imposta le opzioni di avvio</select><div>Comando remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Applica avvio sicuro</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Impostazioni del BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forza eventi di avanzamento</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Blocca il pulsante di accensione</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Pulsante di reset del blocco</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Pulsante di blocco del sonno</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Blocca tastiera</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Bypass password BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modalità sicura</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Usa IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Impostazioni di avvio</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nessuna<option id=ForceDVDBootOption value=1>Forza avvio CD / DVD<option id=ForcePXEBootOption value=2>Forza avvio PXE<option id=ForceHDBootOption value=3>Forza l'avvio del disco rigido<option id=ForceDiagBootOption value=4>Forza avvio diagnostico</select><div>Boot Source</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nessuna<option value=1>Indice 1<option value=2>Indice 2<option value=3>Indice 3<option value=3>Indice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Avvio da floppy<option value=1>Avvia su CD-ROM</select><div>Dispositivo di avvio IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Default del sistema<option id=c46 value=1>Silenzioso<option id=c47 value=2>verboso<option id=c48 value=3>Schermo nero</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Password RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nome dell'allarme</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Data di sveglia (anno-mese-giorno)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Tempo di sveglia (ora: min: sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervallo (giorni-ore-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Mantieni l'allarme<option value=1>Elimina al completamento</select></div><div style=padding-top:4px>Dopo la veglia</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Abilitato<br></label><label><input type=radio name=d26b id=c50 value=0>Disabilitato<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Abilitato<br></label><label><input type=radio name=d26a id=c52 value=0>Disabilitato<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Annulla style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=ok style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Elimina style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,175 +12,176 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Dati non validi";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Dati non validi";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"Cane da guardia dell'agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiato in"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Caso di intrusione";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u00c8 stata stabilita una sessione seriale su LAN remota.";if(1==c[2])return"Sessione remota su seriale via LAN terminata. Il controllo utente \u00e8 stato ripristinato.";if(2==c[2])return"\u00c8 stata stabilita una sessione di reindirizzamento IDE remoto.";
93 +a&&170==c[0])return"Cane da guardia dell'agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... cambiato in"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Caso di intrusione";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u00c8 stata stabilita una sessione seriale su LAN remota.";if(1==c[2])return"Sessione remota su seriale via LAN terminata. Il controllo utente \u00e8 stato ripristinato.";if(2==c[2])return"\u00c8 stata stabilita una sessione di reindirizzamento IDE remoto.";
94 if(3==c[2])return"Sessione di reindirizzamento IDE remoto terminata. Il controllo utente \u00e8 stato ripristinato."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="cablata"),4294967293==a?"Tutti i filtri di pacchetti ricevuti sono stati abbinati"+b+" interfaccia.":4294967292==a?"Tutto il filtro pacchetti in uscita \u00e8 stato associato"+b+" interfaccia.":4294967290==a?"Il filtro pacchetti contraffatto \u00e8 stato abbinato"+b+" interfaccia.":"Filtro"+a+" \u00e8 stato abbinato"+
95 b+" interfaccia.";if(192==a)return 0==c[2]?"Politica di sicurezza invocata. Parte o tutto il traffico di rete (TX) \u00e8 stato arrestato.":2==c[2]?"Politica di sicurezza invocata. Parte o tutto il traffico di rete (RX) \u00e8 stato arrestato.":"Politica di sicurezza invocata.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Richiesta dell'utente per la connessione remota.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Errore EAC: tenta di ottenere la postura mentre NAC in Intel AMT \u00e8 disabilitato.";
96 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Errore HWA: errore generale"}return 6==a?"Autenticazione fallita"+(c[1]+(c[2]<<8))+" volte. Il sistema potrebbe essere sotto attacco.":30==a?"Nessun supporto di avvio":32==a?"Blocco del sistema operativo o interruzione dell'alimentazione":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Errore di avvio del sistema":37==a?"Firmware di sistema avviato (almeno una CPU si sta eseguendo correttamente).":"Tipo di sensore sconosciuto #"+a}
97 -function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),
98 -b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>Locale</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>Porta predefinita KVM</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=
99 -h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*
100 -h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=
101 -function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,
102 -b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,
103 -m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=
104 -function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
108 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
110 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
111 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
112 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
113 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
115 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
116 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
118 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
120 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
121 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
122 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
123 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
125 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
127 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
128 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
130 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
133 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
134 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
135 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
137 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
138 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
139 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
142 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
143 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
144 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
145 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
148 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
149 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
150 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
97 +function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
98 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Locale</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Porta predefinita KVM</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=
99 +g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*
100 +g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=
101 +function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,
102 +b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,
103 +m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=
104 +function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
108 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
110 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
111 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
112 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
113 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
115 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
116 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
118 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
120 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
121 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
122 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
123 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
125 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
127 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
128 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
130 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
133 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
134 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
135 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
137 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
138 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
139 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
140 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
142 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
143 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
144 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
145 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
148 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
149 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
150 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
152 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
153 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
154 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
155 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
156 -[a,b,[]])};var E="Non specificato. ; Nessuna memoria di sistema fisicamente installata nel sistema. ; Nessuna memoria di sistema utilizzabile, tutta la memoria installata ha riscontrato un errore irreversibile. ; Errore irreversibile del disco fisso / ATAPI / IDE. ; Errore irreversibile della scheda di sistema. ; Dischetto irreversibile errore del sottosistema. ; Errore irreversibile del controller del disco fisso. ; Errore irreversibile della tastiera PS / 2 o USB. ; Supporto di avvio rimovibile non trovato. ; Errore irreversibile del controller video. ; Nessun dispositivo video rilevato. ; Corruzione del firmware (BIOS) ROM rilevata. ; Mancata corrispondenza della tensione della CPU (i processori che condividono la stessa alimentazione hanno requisiti di tensione non corrispondenti) ; Errore di corrispondenza della velocit\u00e0 della CPU".split(";"),
157 -m="Non specificato. ; Inizializzazione della memoria. ; Avvio inizializzazione e test del disco rigido ; Inizializzazione processore (i) secondario ; Autenticazione utente ; Impostazione del sistema avviato dall'utente ; Configurazione risorsa USB ; Configurazione risorsa PCI ; Inizializzazione ROM opzionale ; Inizializzazione video ; Inizializzazione cache ; SM Inizializzazione bus ; Inizializzazione controller tastiera ; Inizializzazione controller integrato / controller di gestione ; Collegamento docking station ; Abilitazione docking station ; Espulsione stazione docking ; Disabilitazione docking station ; Chiamata vettoriale di riattivazione sistema operativo ; Avvio processo di avvio sistema operativo ; Inizializzazione scheda madre o scheda madre ; Riservato ; Inizializzazione floppy ; Test tastiera ; Test dispositivo di puntamento ; Inizializzazione processore primario".split(";"),
155 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
156 +[a,b,[]])};var D="Non specificato. ; Nessuna memoria di sistema fisicamente installata nel sistema. ; Nessuna memoria di sistema utilizzabile, tutta la memoria installata ha riscontrato un errore irreversibile. ; Errore irreversibile del disco fisso / ATAPI / IDE. ; Errore irreversibile della scheda di sistema. ; Dischetto irreversibile errore del sottosistema. ; Errore irreversibile del controller del disco fisso. ; Errore irreversibile della tastiera PS / 2 o USB. ; Supporto di avvio rimovibile non trovato. ; Errore irreversibile del controller video. ; Nessun dispositivo video rilevato. ; Corruzione del firmware (BIOS) ROM rilevata. ; Mancata corrispondenza della tensione della CPU (i processori che condividono la stessa alimentazione hanno requisiti di tensione non corrispondenti) ; Errore di corrispondenza della velocit\u00e0 della CPU".split(";"),
157 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
158 k="Non specificato ; Altro ; Sconosciuto ; Processore ; Disco ; Periferiche ; Modulo di gestione del sistema ; Scheda di sistema ; Modulo di memoria ; Modulo del processore ; Alimentazione ; Scheda aggiuntiva ; Scheda del pannello anteriore ; Scheda del pannello posteriore ; Scheda del sistema di alimentazione ; Backplane dell'unit\u00e0 ; Espansione interna del sistema scheda ; Altre schede di sistema ; Scheda del processore ; Unit\u00e0 di potenza ; Modulo di potenza ; Scheda di gestione dell'alimentazione ; Scheda del pannello posteriore del telaio ; Telaio del sistema ; Sottotelaio ; Altre schede del telaio ; Alloggiamento unit\u00e0 disco ; Alloggiamento periferiche ; Alloggiamento dispositivo ; Ventola di raffreddamento ; Unit\u00e0 di raffreddamento ; Cavo di interconnessione ; Dispositivo di memoria ; Software di gestione del sistema ; BIOS ; Intel (r) ME ; Bus di sistema ; Gruppo ; Intel (r) ME ; Ambiente esterno ; Batteria ; Lama di elaborazione ; Interruttore di connettivit\u00e0 ; Modulo processore / memoria ; Modulo I / O ; Modulo I / O del processore ; Firmware del controller di gestione ; Canale IPMI ; Bus PCI ; Bus PCI express ; Bus SCSI ; Bus SATA / SAS ; Bus lato anteriore del processore".split(";");
159 -h.RealmNames=";; Reindirizzamento ;; Risorse hardware ; Telecomando ; Archiviazione ; Gestione eventi ; Amministratore archiviazione ; Presenza agente locale ; Presenza agente remoto ; Interruttore automatico ; Tempo di rete ; Informazioni generali ; Aggiornamento firmware ; EIT ; LocalUN ; Controllo accesso endpoint ; Controllo accesso endpoint Amministratore ; Lettore registro eventi ; Registro controllo ; Regno ACL ;;; Sistema locale".split(";");h.WatchdogCurrentStates={1:"Non iniziato",2:"Fermato",
160 -4:"In esecuzione",8:"Scaduto",16:"Sospeso"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",
161 -2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"Security Admin",17:"RCO",18:"Manager di reindirizzamento",19:"Firmware Update Manager",20:"Registro di controllo della sicurezza",21:"Tempo di rete",22:"Amministrazione di rete",23:"Amministrazione archiviazione",24:"Manager di eventi",25:"Responsabile dell'interruttore",26:"Manager di presenza agente",27:"Configurazione senza fili",28:"EAC",29:"KVM",30:"Eventi di attivazione dell'utente",32:"Oscuramento dello schermo",33:"Eventi del cane da guardia",1600:"Provisioning avviato",
159 +g.RealmNames=";; Reindirizzamento ;; Risorse hardware ; Telecomando ; Archiviazione ; Gestione eventi ; Amministratore archiviazione ; Presenza agente locale ; Presenza agente remoto ; Interruttore automatico ; Tempo di rete ; Informazioni generali ; Aggiornamento firmware ; EIT ; LocalUN ; Controllo accesso endpoint ; Controllo accesso endpoint Amministratore ; Lettore registro eventi ; Registro controllo ; Regno ACL ;;; Sistema locale".split(";");g.WatchdogCurrentStates={1:"Non iniziato",2:"Fermato",
160 +4:"In esecuzione",8:"Scaduto",16:"Sospeso"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",
161 +2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"Security Admin",17:"RCO",18:"Manager di reindirizzamento",19:"Firmware Update Manager",20:"Registro di controllo della sicurezza",21:"Tempo di rete",22:"Amministrazione di rete",23:"Amministrazione archiviazione",24:"Manager di eventi",25:"Responsabile dell'interruttore",26:"Manager di presenza agente",27:"Configurazione senza fili",28:"EAC",29:"KVM",30:"Eventi di attivazione dell'utente",32:"Oscuramento dello schermo",33:"Eventi del cane da guardia",1600:"Provisioning avviato",
162 1601:"Provisioning completato",1602:"Voce ACL aggiunta",1603:"Voce ACL modificata",1604:"Voce ACL rimossa",1605:"Accesso ACL con credenziali non valide",1606:"Stato di ingresso ACL",1607:"Stato TLS modificato",1608:"Set di certificati server TLS",1609:"Rimuovi certificato server TLS",1610:"Aggiunto certificato radice attendibile TLS",1611:"Certificato radice radice TLS rimosso",1612:"Set chiavi precondivise TLS",1613:"Impostazioni Kerberos modificate",1614:"Chiave principale Kerberos modificata",
163 -1615:"Ripristino contatori flash usurati",1616:"Pacchetto di alimentazione modificato",1617:"Imposta la modalit\u00e0 di autenticazione del realm",1618:"Aggiorna il client alla modalit\u00e0 di controllo amministratore",1619:"Annullamento del provisioning avviato",1700:"Accensione eseguita",1701:"Spegnimento eseguito",1702:"Ciclo di potenza eseguito",1703:"Ripristino eseguito",1704:"Imposta le opzioni di avvio",1800:"Sessione IDER aperta",1801:"Sessione IDER chiusa",1802:"IDER abilitato",1803:"IDER disabilitato",
164 -1804:"Sessione SoL aperta",1805:"Sessione SoL chiusa",1806:"SoL abilitato",1807:"SoL disabilitato",1808:"Sessione KVM avviata",1809:"Sessione KVM terminata",1810:"KVM abilitato",1811:"KVM disabilitato",1812:"Password VNC non riuscita 3 volte",1900:"Firmware aggiornato",1901:"Aggiornamento firmware non riuscito",2E3:"Registro controllo sicurezza cancellato",2001:"Politica di controllo della sicurezza modificata",2002:"Registro controllo sicurezza disabilitato",2003:"Registro controllo sicurezza abilitato",
165 -2004:"Registro controllo di sicurezza esportato",2005:"Registro controllo di sicurezza recuperato",2100:"Intel&reg; ME Time Set",2200:"Parametri TCPIP impostati",2201:"Nome host impostato",2202:"Set di nomi di dominio",2203:"Parametri VLAN impostati",2204:"Insieme di criteri di collegamento",2205:"Parametri IPv6 impostati",2300:"Set di attributi di archiviazione globale",2301:"Archiviazione EACL modificata",2302:"Memoria FPACL modificata",2303:"Operazione di scrittura in memoria",2400:"Avviso iscritto",
166 -2401:"Avviso Non iscritto",2402:"Registro eventi cancellato",2403:"Registro eventi congelato",2500:"Filtro CB aggiunto",2501:"Filtro CB rimosso",2502:"Aggiunta politica CB",2503:"Politica CB rimossa",2504:"Set di criteri predefinito CB",2505:"Set di opzioni euristiche CB",2506:"Stato euristico CB cancellato",2600:"Cane da guardia dell'agente aggiunto",2601:"Agent Watchdog rimosso",2602:"Set di azioni del watchdog dell'agente",2700:"Profilo wireless aggiunto",2701:"Profilo wireless rimosso",2702:"Profilo wireless aggiornato",
167 -2800:"Set di firme postura EAC",2801:"EAC abilitato",2802:"EAC disabilitato",2803:"EAC Posture State",2804:"EAC Set Options",2900:"Opt-in KVM abilitato",2901:"Attivazione KVM disabilitata",2902:"Password KVM modificata",2903:"Consenso KVM riuscito",2904:"Consenso KVM non riuscito",3E3:"Modifica della politica di attivazione",3001:"Invia evento codice consenso",3002:"Avvia evento bloccato opt-in"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,
168 -2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Accesso ME non valido","Accesso MEBx non valido"][b.charCodeAt(0)];if(1606==a){var c=["Disabilitato","Abilitato"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"A distanza"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Locale"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+","+["noauth","auth","Disabilitato"][b.charCodeAt(4)]:
169 -1619==a?["BIOS","MEBx","MEI locale","WSMAN locale","WSAMN remoto"][b.charCodeAt(0)]:1900==a?"A partire dal"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" per"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"A partire dal"+["Nessuna","KVM","Tutti"][b.charCodeAt(0)]+" per"+["Nessuna","KVM","Tutti"][b.charCodeAt(1)]:3001==a?["Successo",
170 -"Fallito 3 volte"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
163 +1615:"Ripristino contatori flash usurati",1616:"Pacchetto di alimentazione modificato",1617:"Imposta la modalit\u00e0 di autenticazione del realm",1618:"Aggiorna il client alla modalit\u00e0 di controllo amministratore",1619:"Annullamento del provisioning avviato",1700:"Accensione eseguita",1701:"Spegnimento eseguito",1702:"Ciclo di potenza eseguito",1703:"Ripristino eseguito",1704:"Imposta le opzioni di avvio",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",
164 +1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"Sessione IDER aperta",1801:"Sessione IDER chiusa",1802:"IDER abilitato",1803:"IDER disabilitato",1804:"Sessione SoL aperta",1805:"Sessione SoL chiusa",1806:"SoL abilitato",1807:"SoL disabilitato",1808:"Sessione KVM avviata",1809:"Sessione KVM terminata",1810:"KVM abilitato",1811:"KVM disabilitato",1812:"Password VNC non riuscita 3 volte",1900:"Firmware aggiornato",1901:"Aggiornamento firmware non riuscito",2E3:"Registro controllo sicurezza cancellato",
165 +2001:"Politica di controllo della sicurezza modificata",2002:"Registro controllo sicurezza disabilitato",2003:"Registro controllo sicurezza abilitato",2004:"Registro controllo di sicurezza esportato",2005:"Registro controllo di sicurezza recuperato",2100:"Intel&reg; ME Time Set",2200:"Parametri TCPIP impostati",2201:"Nome host impostato",2202:"Set di nomi di dominio",2203:"Parametri VLAN impostati",2204:"Insieme di criteri di collegamento",2205:"Parametri IPv6 impostati",2300:"Set di attributi di archiviazione globale",
166 +2301:"Archiviazione EACL modificata",2302:"Memoria FPACL modificata",2303:"Operazione di scrittura in memoria",2400:"Avviso iscritto",2401:"Avviso Non iscritto",2402:"Registro eventi cancellato",2403:"Registro eventi congelato",2500:"Filtro CB aggiunto",2501:"Filtro CB rimosso",2502:"Aggiunta politica CB",2503:"Politica CB rimossa",2504:"Set di criteri predefinito CB",2505:"Set di opzioni euristiche CB",2506:"Stato euristico CB cancellato",2600:"Cane da guardia dell'agente aggiunto",2601:"Agent Watchdog rimosso",
167 +2602:"Set di azioni del watchdog dell'agente",2700:"Profilo wireless aggiunto",2701:"Profilo wireless rimosso",2702:"Profilo wireless aggiornato",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"Set di firme postura EAC",2801:"EAC abilitato",2802:"EAC disabilitato",2803:"EAC Posture State",2804:"EAC Set Options",2900:"Opt-in KVM abilitato",2901:"Attivazione KVM disabilitata",
168 +2902:"Password KVM modificata",2903:"Consenso KVM riuscito",2904:"Consenso KVM non riuscito",3E3:"Modifica della politica di attivazione",3001:"Invia evento codice consenso",3002:"Avvia evento bloccato opt-in",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==
169 +b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Accesso ME non valido","Accesso MEBx non valido"][b.charCodeAt(0)];if(1606==a){var c=["Disabilitato","Abilitato"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"A distanza"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Locale"+["noauth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["noauth","auth","Disabilitato"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI locale",
170 +"WSMAN locale","WSAMN remoto"][b.charCodeAt(0)]:1900==a?"A partire dal"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" per"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"A partire dal"+["Nessuna","KVM","Tutti"][b.charCodeAt(0)]+" per"+["Nessuna","KVM","Tutti"][b.charCodeAt(1)]:3001==a?["Successo","Fallito 3 volte"][b.charCodeAt(0)]:
171 +null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
172 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
173 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
174 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
175 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
175 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
176 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
177 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
178 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
179 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
180 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
181 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
182 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
183 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
176 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
177 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
178 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
179 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
180 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
181 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
182 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
183 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
184 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
185 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
186 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
187 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -191,10 +192,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
192 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
193 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
194 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
194 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
195 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
196 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
196 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
197 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
197 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
198 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
199 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
200 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
201 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -204,69 +205,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
205 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
206 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
207 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
207 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
208 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
209 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
210 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
211 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
212 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
213 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
214 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
208 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
209 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
210 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
211 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
212 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
213 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
214 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
215 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
216 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
216 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
217 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
218 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
219 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
220 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
221 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
222 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
223 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
224 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
225 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
226 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
227 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
228 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
229 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
217 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
218 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
219 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
220 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
221 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
222 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
223 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
224 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
225 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
226 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
227 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
228 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
229 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
230 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
231 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
232 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
233 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
234 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
234 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
235 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
236 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
235 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
236 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
237 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
238 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
239 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
240 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
241 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
242 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
242 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
243 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
244 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
245 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
246 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
247 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
248 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
249 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
243 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
244 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
245 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
246 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
247 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
248 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
249 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
250 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
251 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
252 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
253 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
253 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
254 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
255 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
256 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
257 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
258 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
259 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
260 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
261 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
262 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
263 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
264 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
265 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
254 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
255 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
256 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
257 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
258 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
259 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
260 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
261 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
262 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
263 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
264 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
265 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
266 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
267 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
267 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
268 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
269 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
268 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
269 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
270 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
271 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
272 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
273 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -280,213 +281,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
281 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
282 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
283 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
283 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
284 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
285 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
285 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
286 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
287 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
288 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
289 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
290 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
291 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
292 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
286 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
287 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
288 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
289 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
290 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
291 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
292 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
293 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
294 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
294 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
295 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
296 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
295 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
296 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
297 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
298 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
299 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
299 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
300 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
301 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
301 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
302 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
303 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
303 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
304 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
305 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
306 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
307 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
308 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
309 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
310 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
311 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
312 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
313 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
314 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
315 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
304 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
305 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
306 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
307 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
308 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
309 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
310 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
311 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
312 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
313 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
314 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
315 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
316 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
317 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
317 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
318 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
319 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
320 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
321 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
322 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
323 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
324 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
325 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
318 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
319 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
320 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
321 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
322 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
323 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
324 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
325 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
326 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
327 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
328 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
329 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
330 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
331 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
332 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
332 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
333 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
334 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
335 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
336 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
337 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
333 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
334 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
335 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
336 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
337 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
338 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
339 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
339 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
340 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
341 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
341 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
342 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
343 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
344 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
345 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
346 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
347 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
348 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
349 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
350 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
342 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
343 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
344 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
345 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
346 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
347 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
348 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
349 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
350 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
351 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
352 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
352 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
353 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
354 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
355 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
356 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
353 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
354 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
355 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
356 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
357 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
358 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
359 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
360 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
360 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
361 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
362 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
363 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
364 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
364 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
365 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
366 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
367 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
368 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
369 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
370 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
365 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
366 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
367 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
368 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
369 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
370 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
371 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
372 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
372 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
373 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
374 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
375 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
376 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
373 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
374 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
375 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
376 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
377 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
378 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
378 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
379 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
380 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
381 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
381 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
382 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
382 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
383 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
384 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
385 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
385 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
386 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
387 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
388 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
386 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
387 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
388 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
389 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
390 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
390 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
391 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
392 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
393 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
391 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
392 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
393 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
394 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
395 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
396 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
397 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
397 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
398 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
399 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
400 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
401 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
402 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
403 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
404 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
405 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
406 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
407 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
408 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
398 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
399 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
400 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
401 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
402 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
403 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
404 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
405 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
406 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
407 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
408 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
410 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
410 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
411 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
412 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
411 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
412 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
413 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
414 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
414 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
415 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
416 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
417 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
418 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
415 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
416 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
417 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
418 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
419 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
420 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
420 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
421 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
422 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
422 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
423 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
424 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
423 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
424 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
425 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
426 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
426 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
427 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
428 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
429 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
430 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
431 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
432 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
433 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
434 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
435 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
436 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
437 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
438 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
439 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
440 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
441 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
442 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
443 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
444 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
427 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
428 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
430 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
431 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
432 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
433 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
434 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
435 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
436 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
437 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
438 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
439 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
440 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
441 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
442 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
443 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
444 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
445 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
446 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
446 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
447 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
448 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
448 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
449 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
450 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
451 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
451 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
452 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
453 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
454 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
455 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
456 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
457 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
458 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
459 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
460 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
461 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
462 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
463 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
464 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
465 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
466 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
467 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
452 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
453 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
455 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
457 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
458 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
460 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
461 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
463 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
464 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
465 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
466 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
467 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
468 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
469 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
470 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
471 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
471 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
472 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
473 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
472 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
473 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
474 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
475 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
475 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
476 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
477 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
478 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
479 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
480 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
481 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
482 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
482 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
483 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
484 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
485 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
483 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
484 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
485 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
486 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
487 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
487 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
488 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
489 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
488 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
489 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
490 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
491 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
492 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
493 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -504,111 +505,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
505 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
506 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
507 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
507 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
508 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
509 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
510 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
508 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
509 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
510 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
511 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
512 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
512 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
513 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
514 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
515 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
516 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
513 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
514 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
515 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
517 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
518 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
518 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
519 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
520 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
521 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
522 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
522 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
523 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
523 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
524 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
525 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
526 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
527 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
527 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
528 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
529 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
530 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
531 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
532 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
533 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
534 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
534 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
535 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
536 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
536 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
537 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
538 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
539 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
540 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
541 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
542 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
543 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
537 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
538 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
539 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
540 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
541 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
542 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
543 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
544 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
545 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
546 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
546 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
547 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
548 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
548 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
549 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
550 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
550 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
551 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
552 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
553 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
554 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
555 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
556 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
557 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
551 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
552 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
553 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
554 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
555 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
556 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
557 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
558 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
559 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
560 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
560 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
561 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
562 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
563 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
564 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
561 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
562 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
563 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
564 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
565 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
566 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
566 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
567 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
568 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
569 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
570 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
571 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
572 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
573 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
574 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
575 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
576 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
577 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
578 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
579 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
580 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
581 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
567 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
568 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
569 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
570 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
571 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
572 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
573 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
574 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
575 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
576 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
577 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
578 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
579 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
580 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
581 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
582 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
583 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
583 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
584 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
585 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
586 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
587 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
588 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
584 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
585 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
586 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
587 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
588 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
589 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
590 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
591 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
591 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
592 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
592 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
593 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
594 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
594 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
595 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
596 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
596 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
597 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
598 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
599 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
600 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
601 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
597 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
598 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
599 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
600 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
601 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
602 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
603 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
603 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
604 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
605 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
604 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
605 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
606 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
607 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
608 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
609 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
610 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
611 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
611 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
612 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
613 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
614 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
615 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -619,20 +620,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
620 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
621 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
622 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
622 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
623 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
623 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
624 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
625 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
625 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
626 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
626 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
627 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
628 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
629 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
629 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
630 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
631 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
632 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
633 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
634 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
634 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
635 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
635 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
636 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
637 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
638 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
639 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -641,20 +642,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
642 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
643 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
644 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
644 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
645 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
646 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
647 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
648 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
649 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
649 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
650 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
651 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
652 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
653 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
654 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
650 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
651 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
652 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
654 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
655 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
656 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
656 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
657 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
657 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
658 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
659 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
660 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
661 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -678,17 +679,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
679 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
680 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
681 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
681 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
682 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
683 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
684 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
682 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
683 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
684 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
685 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
686 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
687 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
688 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
689 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
690 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
690 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
691 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
691 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
692 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
693 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
694 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
695 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -704,48 +705,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
705 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
706 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
707 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
707 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
708 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
709 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
710 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
711 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
712 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
713 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
714 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
714 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
715 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
716 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
717 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
718 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
718 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
719 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
720 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
720 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
721 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
722 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
723 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
723 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
724 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
725 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
726 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
727 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
728 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
728 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
729 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
730 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
731 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
729 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
730 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
731 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
732 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
733 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
734 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
735 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
736 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
737 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
737 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
738 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
739 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
739 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
740 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
741 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
740 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
741 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
742 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
743 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
744 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
745 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
745 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
746 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
747 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
747 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
748 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
748 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
749 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
750 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
751 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
752 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -753,119 +754,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
754 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
755 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
756 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
756 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
757 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
758 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
759 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
760 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
761 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
762 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
763 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
764 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
765 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
766 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
767 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
768 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
769 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
770 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
771 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
772 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
773 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
774 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
775 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
776 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
777 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
778 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
779 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
780 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
781 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
782 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
783 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
784 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
785 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
786 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
787 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
788 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
789 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
790 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
791 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
792 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
793 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
794 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
795 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
796 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
797 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
798 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
799 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
800 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
801 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
802 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
803 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
804 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
805 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
806 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
807 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
808 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
809 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
810 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
811 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
812 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
813 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
814 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
815 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
816 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
817 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
818 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
819 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
820 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
821 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
822 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
823 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
824 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
825 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
826 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
827 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
828 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
829 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
830 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
831 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
832 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
833 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
834 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
835 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
836 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
837 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
838 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
839 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
840 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
841 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
842 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
843 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
844 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
845 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
846 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
847 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
848 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
849 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
850 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
757 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
758 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
759 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
760 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
761 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
762 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
763 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
764 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
765 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
766 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
767 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
768 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
769 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
770 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
771 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
772 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
773 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
774 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
775 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
776 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
777 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
778 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
779 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
780 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
781 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
782 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
783 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
784 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
785 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
786 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
787 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
788 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
789 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
790 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
791 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
792 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
793 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
794 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
795 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
796 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
797 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
798 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
799 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
800 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
801 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
802 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
803 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
804 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
805 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
806 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
807 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
808 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
809 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
810 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
811 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
812 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
813 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
814 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
815 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
816 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
817 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
818 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
819 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
820 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
821 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
822 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
823 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
824 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
825 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
826 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
827 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
828 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
829 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
830 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
831 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
832 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
833 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
834 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
835 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
836 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
837 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
838 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
839 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
840 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
841 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
842 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
843 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
844 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
845 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
846 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
847 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
848 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
849 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
850 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
851 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
852 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
853 +l.Init();return l},ZLIB=ZLIB||{};
854 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
855 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
853 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
854 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
855 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
856 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
857 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
858 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
859 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
857 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
858 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
860 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
861 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
862 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
863 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
861 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
862 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
863 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
864 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
864 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
865 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
866 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
867 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
868 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
869 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
867 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
868 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
870 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
871 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
872 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
873 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
874 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -887,22 +890,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
890 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
891 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
892 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
890 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
891 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
892 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
893 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
894 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
893 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
894 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
895 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
896 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
897 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
898 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
899 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
900 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
901 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
902 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
900 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
901 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
903 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
904 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
905 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
903 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
904 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
905 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
906 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
907 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
908 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
909 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
910 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
911 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -918,16 +921,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
921 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
922 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
923 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
921 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
922 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
923 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
924 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
925 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
926 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
927 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
924 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
925 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
926 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
927 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
928 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
929 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
930 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
931 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
929 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
930 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Caricamento in corso...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
932 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
933 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Caricamento in corso...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
934 StatusStrs=["Disconnected","Connessione in corso ...","Impostare...","Collegato"],t,t2,rsepass=null;
935 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
936 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -961,15 +964,15 @@ var DMTFPowerStates=";;Accensione;Sonno leggero;Sonno profondo;Ciclo di accensio
964 function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Sconosciuto</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Accensione"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
965 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Connesso",", A batteria"][v.PowerSource]);d+=TableEntry("Energia",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Nessuna</i>":EscapeHtml(c);d+=TableEntry("Nome e dominio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
966 d+=TableEntry("ID di sistema",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID di sistema",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" attivato in modalit\u00e0 controllo amministratore (ACM)",4==l.ProvisioningMode&&(n=" attivato in modalit\u00e0 controllo client (CCM)",b=9));
964 -d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=
965 -amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
966 -6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+=", Porta di reindirizzamento");q&&(e+=", Seriale su LAN");n&&(e+=", IDE-reindirizzamento");h&&(e+=", KVM");""==e&&(e=" Nessuna");d+=TableEntry("Funzionalit\u00e0 attive",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Display principale",7<amtversion&&
967 +d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=
968 +amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||
969 +6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);q&&(e+=", Porta di reindirizzamento");p&&(e+=", Seriale su LAN");n&&(e+=", IDE-reindirizzamento");g&&(e+=", KVM");""==e&&(e=" Nessuna");d+=TableEntry("Funzionalit\u00e0 attive",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Display principale",7<amtversion&&
970 void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Display principale","Display secondario","3 \u00b0 display"][n.DefaultScreen]),e='<span title="'+format("Il display remoto predefinito \u00e8 {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Porta 5900 abilitata"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"secondi opt-in":"secondo opt-in")),e+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" timeout della sessione",9<amtversion&&null!=
968 -amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Soppressione consentita"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Desktop remoto",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=
969 -amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Stato sconosciuto",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="Non richiesto"),1==p&&(e="Richiesto solo per KVM"),4294967295==p&&(e="Sempre richiesto"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consenso dell'utente",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&
971 +amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Soppressione consentita"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Desktop remoto",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=
972 +amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Stato sconosciuto",q=amtsysstate.IPS_OptInService.response.OptInRequired,0==q&&(e="Non richiesto"),1==q&&(e="Richiesto solo per KVM"),4294967295==q&&(e="Sempre richiesto"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consenso dell'utente",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&
973 (e={0:"Sconosciuto",1:"Altro",2:"Abilitato",3:"Disabilitato",4:"Chiudere",5:"Non applicabile",6:"Abilitato ma offline",7:"In prova",8:"differite",9:"quiesce",10:"Di partenza",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Sconosciuto",d+=TableEntry("Boot Features",
971 -addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Politica energetica",
972 -addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Appuntamento",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Azioni di potere ...","showPowerActionDlg()")+" ";e+=AddButton("Salva stato ...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
974 +addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("Politica energetica",
975 +addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Appuntamento",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Azioni di potere ...","showPowerActionDlg()")+" ";e+=AddButton("Salva stato ...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
976 QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" La modifica delle impostazioni di rete potrebbe rendere questa pagina non disponibile.");d=d+"<br><h2>impostazioni generali</h2>"+TableStart();e="";"<i>Nessuna</i>"!=c&&(1==v.SharedFQDN&&(e=", condiviso con il sistema operativo"),0==v.SharedFQDN&&(e=", diverso dal sistema operativo"));d+=TableEntry("Nome e dominio",addLinkConditional(c+
977 e,"showEditNameDlg(1)",xxAccountAdminName));c="Disabilitato";1==v.DDNSUpdateEnabled?c="Abilitato ciascuno"+v.DDNSPeriodicUpdateInterval+" minuti, TTL \u00e8"+v.DDNSTTL+" minuti":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Aggiornamento dal server DHCP");d+=TableEntry("DNS dinamico",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=
978 a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interfaccia wireless":"Interfaccia cablata")+"</h2>";d+=TableStart();d+=TableEntry("Stato di collegamento",1==c.LinkIsUp?"Il collegamento \u00e8 attivo":"Il link non \u00e8 attivo");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(B in c.LinkPolicy)1==c.LinkPolicy[B]&&e.push("S0 / AC"),14==c.LinkPolicy[B]&&e.push("Sx / AC"),16==c.LinkPolicy[B]&&e.push("S0 / DC"),224==c.LinkPolicy[B]&&
@@ -977,8 +980,8 @@ e.push("Sx / DC");0==e.length&&e.push("");d+=TableEntry("Politica di collegament
980 s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Stato radio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Nessuna</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
981 "Abilitato":"Disabilitato","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Abilitato":"Disabilitato",
982 "showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Rispondi al ping",addLinkConditional(["Disabilitato","Risposta ICMP","Risposta RMCP","Risposta ICMP e RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Automatico tramite server DHCP":"Indirizzo IP statico",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("Stato IPv4",addLinkConditional(e,
980 -"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Indirizzo IPv4",isIpAddress(c.IPAddress,"Nessuna"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway / maschera IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nessuna")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Server dei nomi di dominio IPv4",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Disabilitato",
981 -w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Indirizzi abilitati, automatici e manuali":"Abilitato, indirizzi automatici");d+=TableEntry("Stato IPv6",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));
983 +"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Indirizzo IPv4",isIpAddress(c.IPAddress,"Nessuna"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway / maschera IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nessuna")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Server dei nomi di dominio IPv4",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="Disabilitato",
984 +w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Indirizzi abilitati, automatici e manuali":"Abilitato, indirizzi automatici");d+=TableEntry("Stato IPv6",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));
985 if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("Indirizzo IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Indirizzo IPv6","Nessuna");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Router predefinito IPv6",c.CurrentDefaultRouter));
986 isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Server dei nomi di dominio IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}
987 function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
@@ -1027,8 +1030,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1030 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Disabilitato":"Abilitato",c&2&&(b+=", Bloccato"),c&4&&(b+=", Quasi pieno"),c&8&&(b+=", Pieno"),c&16&&(b+=", NoKey"),c="<h1>Impostazioni registro di controllo</h1>"+TableStart(),c+=TableEntry("Stato",b),c+=TableEntry("Conservazione",a[0].CurrentNumberOfRecords+" record (s),"+a[0].PercentageFree+"% gratuito"),c+=TableEntry("Sovrascrivi politica",2==a[0].OverwritePolicy?"Si avvolge quando \u00e8 pieno":"Non sovrascrive mai"),
1031 c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1032 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtro" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salva...","SaveAuditLog()")+AddButton("Pulisci il registro","ClearAuditLog()"))+"<br>");if(0==c.length)d="Nessun evento del registro di controllo trovato.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tempo</b><td class=r1 style=width:260px><b>Iniziatore</b><td class=r1><b>Action</b>";
1030 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1031 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Log di controllo Intel AMT",auditLog)}
1033 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1034 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Log di controllo Intel AMT",auditLog)}
1035 function ClearAuditLog(b){QH(60,"Cancella registro di controllo?");setDialogMode(1,"Registro di audizione",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1036 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Registro di audizione","Errore: "+d)}
1037 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tempo",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniziatore",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Indirizzo",a.NetAddress));d+=addHtmlValue("Applicazione",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Dati estesi",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=
@@ -1079,7 +1082,7 @@ function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabi
1082 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Sconosciuto;Altro;Abilitato;Disabilitato;Chiudere;Non applicabile;Abilitato ma offline;In prova;differite;quiesce;Di partenza".split(";"),watchdogMonitoredEntity="Sconosciuto;Altro;Sistema operativo;Processo di avvio del sistema operativo;Processo di spegnimento del sistema operativo;Processo di avvio del firmware;Processo di avvio del BIOS;Applicazione;Processore di servizio".split(";");
1083 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Numero massimo",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" cani da guardia");b+=TableEntry("Numero massimo di azioni totali",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" Azioni");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gestisci i watchdog di presenza degli agenti Intel&reg; AMT.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1084 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Nessun watchdog di presenza agente trovato.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Aggiungi azione ..." onclick=addWatchdogAction(event,'+
1082 -c+")>";a.transitions&&(b+='<input type=button style=float:right value="Elimina azioni ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=": Evento da registrare")}""!=d&&(b+="<div style=padding:12px>"+
1085 +c+")>";a.transitions&&(b+='<input type=button style=float:right value="Elimina azioni ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento da registrare")}""!=d&&(b+="<div style=padding:12px>"+
1086 d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Aggiungi watchdog ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Qualsiasi stato";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1087 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Descrizione",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entit\u00e0 monitorata",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Stato attuale",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Stato abilitato",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervallo di avvio",
1088 b.StartupInterval+" secondo (s)");c+=addHtmlValue("Intervallo di timeout",b.TimeoutInterval+" secondo (s)");setDialogMode(11,format("Cane da guardia {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1173,7 +1176,7 @@ v&&(n+="Disabilitato,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Real
1176 "newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1177 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Modifica account",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1178 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nuovo account",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1176 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Errore dell'account","Parametri non validi");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1179 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Errore dell'account","Parametri non validi");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1180 l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1181 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Amministratore</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1182 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Solo locale","Solo rete","Tutti (locali e di rete)"];
@@ -1191,8 +1194,8 @@ c3.value="Avvia acquisizione"}}function terminal_FileSelectHandler(b){haltEvent(
1194 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1195 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1196 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1194 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1195 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1197 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1198 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1199 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1200 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1201 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1203,14 +1206,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1206 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1207 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1208 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Collegare":"Disconnect";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Desktop remoto","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Desktop remoto","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?
1206 -messagebox("Desktop remoto","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1207 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Impostazioni desktop remoto",3,showDesktopSettingsChanged))}
1209 +messagebox("Desktop remoto","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Desktop remoto","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=
1210 +amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1211 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Impostazioni desktop remoto",3,showDesktopSettingsChanged))}
1212 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1213 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1210 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1211 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1212 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1213 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1214 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1215 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1216 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1217 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1218 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1219 "8px"),center()))}
1220 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Voce tastiera remota",3,showDeskTypeEx,'<div>Immettere il testo e fare clic su OK per digitarlo in remoto utilizzando una tastiera inglese statunitense. Assicurarsi di posizionare il cursore remoto nella posizione corretta prima di procedere.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1221,13 +1225,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1225 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1226 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1227 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1224 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1228 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1229 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1230 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1231 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1228 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Radice</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1229 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1230 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1232 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Radice</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1233 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1234 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1235 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1236 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1237 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1349,10 +1353,9 @@ function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_
1353 998);setDialogMode(5,"Azioni di potere",3,powerActionDlgCheck)}else messagebox("Azione di potere",format("Impossibile ottenere le funzionalit\u00e0 di sistema, errore {0}",d))}
1354 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"Azione di potenza completata."):QH(60,format("Errore azione alimentazione # {0}.",e));setDialogMode(1,"Azione di potere",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Conferma l'esecuzione di Intel&reg; Remote Secure Erase?<br>Immettere la password di cancellazione sicura, se necessario.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Parola d'ordine</div></div><br><div style=color:red><b> ATTENZIONE: </b> Questo canceller\u00e0 i dati sul sistema remoto.</div>",
1355 rsepass=1,setDialogMode(11,"Azioni di potere",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1352 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ATTENZIONE: </b> Questo canceller\u00e0 i dati sul sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1353 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1354 -a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Azioni di potere",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1355 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1356 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> ATTENZIONE: </b> Questo canceller\u00e0 i dati sul sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1357 +d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1358 +"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Azioni di potere",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1359 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Azione di potere","Verifica dello stato ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1360 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Azione di potere","Verifica dello stato ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1361 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1386,10 +1389,10 @@ targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+
1389 function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1390 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1391 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1389 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1390 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci lo storage Intel&reg; AMT per questo computer.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+
1391 -p):e+"Radice";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Scarica","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" byte</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",
1392 -function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Nessun file trovato.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Caricare...","UploadToStorage()"):
1392 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1393 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci lo storage Intel&reg; AMT per questo computer.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+" / "+
1394 +q):e+"Radice";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Scarica","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" byte</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",
1395 +function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Nessun file trovato.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Caricare...","UploadToStorage()"):
1396 ""));QH(55,a)}else QH(55,"Impossibile caricare i dati di archiviazione ...<br/>"+AddButton("ricaricare","PullStorage()"))}
1397 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("venditore",b));""!=c&&(e+=addHtmlValue("Applicazione",c));e+=addHtmlValue("Nome",a);e+=addHtmlValue("Dimensione",v.size+" bytes");v.link&&(e+=addHtmlValue("collegamento",v.link));setDialogMode(11,"Articolo di archiviazione",5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1398 function storageDeleteResponse(b,c){200!=c?messagebox("Conservazione",format("Impossibile eliminare il file (ERR {0}), verificare che il computer sia acceso.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}
@@ -1404,7 +1407,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1407 b}
1408 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1409 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1407 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," giorni").replace("H"," ore").replace("M"," minuti");b=b.replace(" 1 giorni"," 1 giorno").replace(" 1 ora"," 1 ora").replace(" 1 minuti"," 1 minuto");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1410 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," giorni").replace("H"," ore").replace("M"," minuti");b=b.replace(" 1 giorni"," 1 giorno").replace(" 1 ora"," 1 ora").replace(" 1 minuti "," 1 minuto ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1411 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gestisci sveglie.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, svegliati "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," a"),void 0!=d[c].Interval&&(a+=" e ciascuno"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", eliminare al termine"),b+=
1412 "<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Modificare...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Nessun allarme di sveglia registrato.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Rimuovi tutti gli allarmi","RemoveAllAlarms()")+AddButton("Inserisci",
1413 "showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-ja.htm
+628 -623
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="ja" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=接続する onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>切断された</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>システムステータス</a><p id=go14 class=nav1 onclick=go(14)><a>リモートデスクトップ</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>ファイル</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>ハードウェア情報</a><p id=go6 class=nav1 onclick=go(6)><a>イベントログ</a><p id=go15 class=nav1 onclick=go(15)><a>監査ログ</a><p id=go21 class=nav1 onclick=go(21)><a>ストレージ</a><p id=go8 class=nav1 onclick=go(8)><a>ネットワーク設定</a><p id=go17 class=nav1 onclick=go(17)><a>インターネット設定</a><p id=go16 class=nav1 onclick=go(16)><a>セキュリティ設定</a><p id=go19 class=nav1 onclick=go(19)><a>エージェントの存在</a><p id=go18 class=nav1 onclick=go(18)><a>システム防御</a><p id=go11 class=nav1 onclick=go(11)><a>ユーザーアカウント</a><p id=go22 class=nav1 onclick=go(22)><a>定期購入</a><p id=go23 class=nav1 onclick=go(23)><a>ウェイクアラーム</a><p id=go12 class=nav1 onclick=go(12)><a>WSMANブラウザ</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=ディスクマップ onclick=iderToggleDiskMap()><input type=button value=IDE-Rセッションを停止 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>フロッピー、ブロックは512バイトです。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM、ブロックは2048バイトです。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>このコンピューターのファームウェアを更新する必要があります。&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>こちらをご確認ください</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>読み込んでいます...</h1></div><div id=p1 style=display:none><h1>システムステータス</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>ハードウェア情報</h1><span id=16></span></div><div id=p6 style=display:none><h1>イベントログ</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>ネットワーク設定</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>ユーザーアカウント</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMANブラウザ</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=クエリ style=margin:4px onclick=wsmanQuery()><input type=button value=晴れ style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=フィルタ style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LANターミナル</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはSerial-over-LAN機能が無効になっています<span id=26>、ここをクリックして有効にします。</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=キャプチャを開始 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=接続する onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>切断されました。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="リターンキーが送信するものを切り替えます" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="端子サイズを切り替え" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="インテル(F10 = ESC + [OM)" title="F1キーからF10キーへのエミュレーションタイプを切り替える" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=拡張アスキー title="端末エミュレーションタイプを切り替え" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>バックスペース<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=ペースト disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>リモートデスクトップ</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはKVM機能が無効になっています<span id=37>、ここをクリックして有効にします。</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="左に回転" onclick=drotate(-1)>↺</div><div class=rb title="右に回る" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="全画面モードを切り替え" onkeypress="return false" onkeydown="return false" value=いっぱい onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="リモートデスクトップのスクリーンショットを保存する" onkeypress="return false" onkeydown="return false" value=セーブ... onclick=deskSaveImage() style=margin-right:3px><input type=button value=設定... title="リモートデスクトップ設定を編集する" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="リモートマシンの電源状態を変更する" onkeypress="return false" onkeydown="return false" value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=接続する onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>切断されました。</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>勝つ<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>勝利+左<option value=24>勝利+右<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=タイプ onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>空白の画面&nbsp;</span><span id=47><input id=48 type=checkbox>表示のみ&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>監査ログ</h1><span id=50></span></div><div id=p16 style=display:none><h1>セキュリティ設定</h1><span id=51></span></div><div id=p17 style=display:none><h1>インターネット設定</h1><span id=52></span></div><div id=p18 style=display:none><h1>システム防御</h1><span id=53></span></div><div id=p19 style=display:none><h1>エージェントの存在</h1><span id=54></span></div><div id=p21 style=display:none><h1>ストレージ</h1><span id=55></span></div><div id=p22 style=display:none><h1>イベントのサブスクリプション</h1><span id=56></span></div><div id=p23 style=display:none><h1>ウェイクアラーム</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>ファイル</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=アップ>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=すべて選択 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=リネーム onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=削除する onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新しいフォルダ onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=アップロードする onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切る onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=コピーする onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=ペースト onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=リフレッシュ onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>ユーザー名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワード*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワードを認証する</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>地元<option value=1>通信網<option value=2>どれか</select><div>許可</div></div><div>付与された権限</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*大文字、小文字、0〜9、および!@#$%^&*()+-のいずれかを含む最小8文字</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>パワーアクション</div></div><div><span style=color:red>警告:</span>電源操作によっては、データが失われたり、デスクトップ、ターミナル、またはディスクのリダイレクトセッションが切断されたりする場合があります。</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意コード</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>プライマリディスプレイ<option value=1>セカンダリディスプレイ<option id=d6ThirdDisplay value=2 style=display:none>3番目のディスプレイ</select><div>同意表示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>画像エンコーディング</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>ローカルマウスカーソルを表示</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Delを表示する</label><br><label><input type=checkbox id=d7limitFrameRate>フレームレートを制限</label><br><label><input type=checkbox id=d7noMouseRotate>マウスを回転させない</label><br></div><div>その他の設定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">ソフトウェアKVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>品質</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>スケーリング</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理者 style=float:right;width:220px><div style=height:20px>ユーザー名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>パスワード</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>リダイレクトポート</label><label id=c15 style=display:block><input type=checkbox id=c16>KVMリモートデスクトップ</label><label style=display:block><input type=checkbox id=c17>IDEリダイレクト<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不要<br></label><label><input type=radio name=d10 id=c20 value=1>KVMにのみ必要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>常に必要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">プロファイル名</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>優先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>認証</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>無し</select><div>暗号化</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワード*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワードを認証する</div></div></div><div id=dialog19 style=margin:auto;margin:3px>これにより、このマシンのインテル®AMTの状態全体がファイルに保存されます。パスワードは保存されませんが、一部の機密データが含まれる場合があります。<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>無効<br><input type=radio name=d20 id=d20b value=1>ICMP応答<br><input type=radio name=d20 id=d20c value=2>RMCP応答<br><input type=radio name=d20 id=d20d value=3>ICMPおよびRMCP応答<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>オペレーティングシステムのIPアドレスの同期</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IPアドレス</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>サブネットマーク</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>ゲートウェイ</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>プライマリDNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>代替DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>無効<option value=1>無効、DHCPアップデート<option value=2>有効</select><div>動的DNSクライアント</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>更新間隔(分)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>デフォルトの間隔は1440分、デフォルトのTTLは900秒です。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>パワーアップ<option value=10>リセット<option value=5>パワーサイクル<option value=8>パワーダウン<option id=d24p500 value=500>スタンバイからのOSウェイク<option id=d24p501 value=501>OSの省電力<option value=999>起動オプションを設定する</select><div>リモートコマンド</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS一時停止</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>セキュアブートを強制する</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS設定</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>強制進行イベント</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>ロック電源ボタン</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>ロックリセットボタン</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>ロックスリープボタン</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>キーボードをロック</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOSパスワードバイパス</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOSの再フラッシュ</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>セーフモード</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDERを使用する</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>インテル®リモートセキュア消去</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>起動設定</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>無し<option id=ForceDVDBootOption value=1>CD / DVDブートを強制する<option id=ForcePXEBootOption value=2>PXEブートを強制する<option id=ForceHDBootOption value=3>強制的にハードディスクを起動<option id=ForceDiagBootOption value=4>診断ブートを強制</select><div>ブートソース</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>無し<option value=1>インデックス1<option value=2>インデックス2<option value=3>インデックス3<option value=3>インデックス4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>フロッピーから起動<option value=1>CDROMから起動</select><div>IDERブートデバイス</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>システムのデフォルト<option id=c46 value=1>静か<option id=c47 value=2>冗長<option id=c48 value=3>空白の画面</select><div>冗長</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSEパスワード</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>アラーム名</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>ウェイク日(年月日)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>ウェイク時間(時:分:秒)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>間隔(日-時間-分)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>アラームを保持<option value=1>完了時に削除</select></div><div style=padding-top:4px>起きた後</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>有効<br></label><label><input type=radio name=d26b id=c50 value=0>無効<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>有効<br></label><label><input type=radio name=d26a id=c52 value=0>無効<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=キャンセル style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=削除する style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="ja" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=接続する onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>切断された</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>システムステータス</a><p id=go14 class=nav1 onclick=go(14)><a>リモートデスクトップ</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>ファイル</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>ハードウェア情報</a><p id=go6 class=nav1 onclick=go(6)><a>イベントログ</a><p id=go15 class=nav1 onclick=go(15)><a>監査ログ</a><p id=go21 class=nav1 onclick=go(21)><a>ストレージ</a><p id=go8 class=nav1 onclick=go(8)><a>ネットワーク設定</a><p id=go17 class=nav1 onclick=go(17)><a>インターネット設定</a><p id=go16 class=nav1 onclick=go(16)><a>セキュリティ設定</a><p id=go19 class=nav1 onclick=go(19)><a>エージェントの存在</a><p id=go18 class=nav1 onclick=go(18)><a>システム防御</a><p id=go11 class=nav1 onclick=go(11)><a>ユーザーアカウント</a><p id=go22 class=nav1 onclick=go(22)><a>定期購入</a><p id=go23 class=nav1 onclick=go(23)><a>ウェイクアラーム</a><p id=go12 class=nav1 onclick=go(12)><a>WSMANブラウザ</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=ディスクマップ onclick=iderToggleDiskMap()><input type=button value=IDE-Rセッションを停止 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>フロッピー、ブロックは512バイトです。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM、ブロックは2048バイトです。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>このコンピューターのファームウェアを更新する必要があります。&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>こちらをご確認ください</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>読み込んでいます...</h1></div><div id=p1 style=display:none><h1>システムステータス</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>ハードウェア情報</h1><span id=16></span></div><div id=p6 style=display:none><h1>イベントログ</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>ネットワーク設定</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>ユーザーアカウント</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMANブラウザ</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=クエリ style=margin:4px onclick=wsmanQuery()><input type=button value=晴れ style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=フィルタ style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LANターミナル</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはSerial-over-LAN機能が無効になっています<span id=26>、ここをクリックして有効にします。</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=キャプチャを開始 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=接続する onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>切断されました。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="リターンキーが送信するものを切り替えます" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="端子サイズを切り替え" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="インテル(F10 = ESC + [OM)" title="F1キーからF10キーへのエミュレーションタイプを切り替える" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=拡張アスキー title="端末エミュレーションタイプを切り替え" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>バックスペース<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=ペースト disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>リモートデスクトップ</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>インテル®AMTリダイレクションポートまたはKVM機能が無効になっています<span id=37>、ここをクリックして有効にします。</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>リモートコンピュータの電源が入っていません。ここをクリックして電源コマンドを発行してください。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="左に回転" onclick=drotate(-1)>↺</div><div class=rb title="右に回る" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="全画面モードを切り替え" onkeypress="return false" onkeydown="return false" value=いっぱい onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="リモートデスクトップのスクリーンショットを保存する" onkeypress="return false" onkeydown="return false" value=セーブ... onclick=deskSaveImage() style=margin-right:3px><input type=button value=設定... title="リモートデスクトップ設定を編集する" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=アイダー title="リモートディスクマウント操作を開始する" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="リモートマシンの電源状態を変更する" onkeypress="return false" onkeydown="return false" value=パワーアクション... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=接続する onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>切断されました。</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>勝つ<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>勝利+左<option value=24>勝利+右<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=送る onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=タイプ onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>空白の画面&nbsp;</span><span id=47><input id=48 type=checkbox>表示のみ&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>監査ログ</h1><span id=50></span></div><div id=p16 style=display:none><h1>セキュリティ設定</h1><span id=51></span></div><div id=p17 style=display:none><h1>インターネット設定</h1><span id=52></span></div><div id=p18 style=display:none><h1>システム防御</h1><span id=53></span></div><div id=p19 style=display:none><h1>エージェントの存在</h1><span id=54></span></div><div id=p21 style=display:none><h1>ストレージ</h1><span id=55></span></div><div id=p22 style=display:none><h1>イベントのサブスクリプション</h1><span id=56></span></div><div id=p23 style=display:none><h1>ウェイクアラーム</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>ファイル</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=アップ>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=すべて選択 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=リネーム onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=削除する onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新しいフォルダ onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=アップロードする onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切る onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=コピーする onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=ペースト onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=リフレッシュ onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">名前順<option value=2>サイズで並べ替え<option value=3>日付けで並び替え<option value=4>名前で降順<option value=5>サイズで降順<option value=6>日付で降順</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>ユーザー名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワード*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>パスワードを認証する</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>地元<option value=1>通信網<option value=2>どれか</select><div>許可</div></div><div>付与された権限</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*大文字、小文字、0〜9、および!@#$%^&*()+-のいずれかを含む最小8文字</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>パワーアクション</div></div><div><span style=color:red>警告:</span>電源操作によっては、データが失われたり、デスクトップ、ターミナル、またはディスクのリダイレクトセッションが切断されたりする場合があります。</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意コード</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>プライマリディスプレイ<option value=1>セカンダリディスプレイ<option id=d6ThirdDisplay value=2 style=display:none>3番目のディスプレイ</select><div>同意表示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>画像エンコーディング</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>無効<option value=2>Automatic<option value=3>有効</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>ローカルマウスカーソルを表示</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Delを表示する</label><br><label><input type=checkbox id=d7limitFrameRate>フレームレートを制限</label><br><label><input type=checkbox id=d7noMouseRotate>マウスを回転させない</label><br></div><div>その他の設定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">ソフトウェアKVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>品質</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>スケーリング</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理者 style=float:right;width:220px><div style=height:20px>ユーザー名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>パスワード</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>リダイレクトポート</label><label id=c15 style=display:block><input type=checkbox id=c16>KVMリモートデスクトップ</label><label style=display:block><input type=checkbox id=c17>IDEリダイレクト<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不要<br></label><label><input type=radio name=d10 id=c20 value=1>KVMにのみ必要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>常に必要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">プロファイル名</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最大32文字"><div title="最大32文字">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>優先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>認証</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>無し</select><div>暗号化</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワード*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8〜63文字の長さ"><div title="8〜63文字の長さ">パスワードを認証する</div></div></div><div id=dialog19 style=margin:auto;margin:3px>これにより、このマシンのインテル®AMTの状態全体がファイルに保存されます。パスワードは保存されませんが、一部の機密データが含まれる場合があります。<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>無効<br><input type=radio name=d20 id=d20b value=1>ICMP応答<br><input type=radio name=d20 id=d20c value=2>RMCP応答<br><input type=radio name=d20 id=d20d value=3>ICMPおよびRMCP応答<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>オペレーティングシステムのIPアドレスの同期</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IPアドレス</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>サブネットマーク</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>ゲートウェイ</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>プライマリDNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>代替DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>無効<option value=1>無効、DHCPアップデート<option value=2>有効</select><div>動的DNSクライアント</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>更新間隔(分)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>デフォルトの間隔は1440分、デフォルトのTTLは900秒です。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>パワーアップ<option value=10>リセット<option value=5>パワーサイクル<option value=8>パワーダウン<option id=d24p500 value=500>スタンバイからのOSウェイク<option id=d24p501 value=501>OSの省電力<option value=999>起動オプションを設定する</select><div>リモートコマンド</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS一時停止</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>セキュアブートを強制する</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS設定</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>強制進行イベント</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>ロック電源ボタン</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>ロックリセットボタン</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>ロックスリープボタン</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>キーボードをロック</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOSパスワードバイパス</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOSの再フラッシュ</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>セーフモード</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDERを使用する</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>インテル®リモートセキュア消去</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>起動設定</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>無し<option id=ForceDVDBootOption value=1>CD / DVDブートを強制する<option id=ForcePXEBootOption value=2>PXEブートを強制する<option id=ForceHDBootOption value=3>強制的にハードディスクを起動<option id=ForceDiagBootOption value=4>診断ブートを強制</select><div>ブートソース</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>無し<option value=1>インデックス1<option value=2>インデックス2<option value=3>インデックス3<option value=3>インデックス4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>フロッピーから起動<option value=1>CDROMから起動</select><div>IDERブートデバイス</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>システムのデフォルト<option id=c46 value=1>静か<option id=c47 value=2>冗長<option id=c48 value=3>空白の画面</select><div>冗長</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSEパスワード</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>アラーム名</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>ウェイク日(年月日)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>ウェイク時間(時:分:秒)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>間隔(日-時間-分)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>アラームを保持<option value=1>完了時に削除</select></div><div style=padding-top:4px>起きた後</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>有効<br></label><label><input type=radio name=d26b id=c50 value=0>無効<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>有効<br></label><label><input type=radio name=d26a id=c52 value=0>無効<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=キャンセル style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=削除する style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,187 +12,188 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\u7121\u52b9\u306a\u30c7\u30fc\u30bf";if(0==b)return E[c[1]];if(3==b){if(170==
91 -c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"\u7121\u52b9\u306a\u30c7\u30fc\u30bf";if(0==b)return D[c[1]];if(3==b){if(170==
91 +c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",
92 c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";
93 -if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u306b\u5909\u308f\u3063\u305f"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u30b1\u30fc\u30b9\u4fb5\u5165";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u30ea\u30e2\u30fc\u30c8\u30b7\u30ea\u30a2\u30eb\u30aa\u30fc\u30d0\u30fcLAN\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u78ba\u7acb\u3055\u308c\u307e\u3057\u305f\u3002";
93 +if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u306b\u5909\u308f\u3063\u305f"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u30b1\u30fc\u30b9\u4fb5\u5165";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u30ea\u30e2\u30fc\u30c8\u30b7\u30ea\u30a2\u30eb\u30aa\u30fc\u30d0\u30fcLAN\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u78ba\u7acb\u3055\u308c\u307e\u3057\u305f\u3002";
94 if(1==c[2])return"\u30ea\u30e2\u30fc\u30c8\u30b7\u30ea\u30a2\u30eb\u30aa\u30fc\u30d0\u30fcLAN\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\u30e6\u30fc\u30b6\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u5fa9\u5143\u3055\u308c\u307e\u3057\u305f\u3002";if(2==c[2])return"\u30ea\u30e2\u30fc\u30c8IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u78ba\u7acb\u3055\u308c\u307e\u3057\u305f\u3002";if(3==c[2])return"\u30ea\u30e2\u30fc\u30c8IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002\u30e6\u30fc\u30b6\u30fc\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u304c\u5fa9\u5143\u3055\u308c\u307e\u3057\u305f\u3002"}if(36==
95 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="\u6709\u7dda"),4294967293==a?"\u53d7\u4fe1\u3057\u305f\u3059\u3079\u3066\u306e\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002":4294967292==a?"\u3059\u3079\u3066\u306e\u9001\u4fe1\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002":
96 4294967290==a?"\u30b9\u30d7\u30fc\u30d5\u30a3\u30f3\u30b0\u3055\u308c\u305f\u30d1\u30b1\u30c3\u30c8\u30d5\u30a3\u30eb\u30bf\u30fc\u304c\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002":"\u30d5\u30a3\u30eb\u30bf"+a+" \u306b\u4e00\u81f4\u3057\u307e\u3057\u305f"+b+" \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3002";if(192==a)return 0==c[2]?"\u547c\u3073\u51fa\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3002\u4e00\u90e8\u307e\u305f\u306f\u3059\u3079\u3066\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\uff08TX\uff09\u304c\u505c\u6b62\u3057\u307e\u3057\u305f\u3002":
97 2==c[2]?"\u547c\u3073\u51fa\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3002\u4e00\u90e8\u307e\u305f\u306f\u3059\u3079\u3066\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\uff08RX\uff09\u304c\u505c\u6b62\u3057\u307e\u3057\u305f\u3002":"\u547c\u3073\u51fa\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30dd\u30ea\u30b7\u30fc\u3002";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"\u30ea\u30e2\u30fc\u30c8\u63a5\u7d9a\u306e\u30e6\u30fc\u30b6\u30fc\u8981\u6c42\u3002";
98 if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC\u30a8\u30e9\u30fc\uff1aIntel AMT\u306eNAC\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u3068\u304d\u306b\u30dd\u30b9\u30c1\u30e3\u3092\u53d6\u5f97\u3057\u3088\u3046\u3068\u3057\u307e\u3057\u305f\u3002";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA\u30a8\u30e9\u30fc\uff1a\u4e00\u822c\u7684\u306a\u30a8\u30e9\u30fc"}return 6==a?"\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f"+(c[1]+(c[2]<<8))+" \u56de\u3002\u30b7\u30b9\u30c6\u30e0\u304c\u653b\u6483\u3092\u53d7\u3051\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002":
99 30==a?"\u30d6\u30fc\u30bf\u30d6\u30eb\u30e1\u30c7\u30a3\u30a2\u306a\u3057":32==a?"\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u30ed\u30c3\u30af\u30a2\u30c3\u30d7\u307e\u305f\u306f\u96fb\u6e90\u306e\u4e2d\u65ad":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"\u30b7\u30b9\u30c6\u30e0\u306e\u8d77\u52d5\u5931\u6557":37==a?"\u30b7\u30b9\u30c6\u30e0\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u304c\u8d77\u52d5\u3057\u307e\u3057\u305f\uff08\u5c11\u306a\u304f\u3068\u30821\u3064\u306eCPU\u304c\u6b63\u3057\u304f\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\uff09\u3002":
100 -"\u4e0d\u660e\u306a\u30bb\u30f3\u30b5\u30fc\u30bf\u30a4\u30d7\uff03"+a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];
101 -b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>\u5730\u5143</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>KVM\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30fc\u30c8</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);
102 -e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;
103 -h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},
104 -0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),
105 -b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};
106 -h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==
107 -a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
108 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
109 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
110 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
111 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
112 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
113 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
114 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
115 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
116 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
117 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
118 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
119 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
120 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
121 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
122 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
123 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
124 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
125 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
126 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
127 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
128 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
129 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
130 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
131 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
132 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
133 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
134 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
135 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
137 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
138 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
139 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
140 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
141 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
142 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
143 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
144 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
145 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
146 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
147 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
148 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
149 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
150 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
151 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
152 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
153 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
154 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
100 +"\u4e0d\u660e\u306a\u30bb\u30f3\u30b5\u30fc\u30bf\u30a4\u30d7\uff03"+a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];
101 +b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\u5730\u5143</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30fc\u30c8</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);
102 +u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;
103 +g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},
104 +0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),
105 +b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};
106 +g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==
107 +a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
108 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
109 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
110 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
111 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
112 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
113 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
114 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
115 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
116 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
117 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
118 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
119 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
120 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
121 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
122 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
123 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
124 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
125 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
126 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
127 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
128 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
129 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
130 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
131 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
132 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
133 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
134 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
135 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
136 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
137 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
138 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
139 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
140 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
141 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
142 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
143 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
144 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
145 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
146 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
147 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
148 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
149 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
150 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
151 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
152 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
153 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
154 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
155 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
156 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
157 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
158 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
159 -[a,b,[]])};var E="Unspecified\u3002;\u30b7\u30b9\u30c6\u30e0\u306b\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u7269\u7406\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002;\u4f7f\u7528\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30e1\u30e2\u30ea\u306b\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af/ ATAPI / IDE\u30c7\u30d0\u30a4\u30b9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30c7\u30a3\u30b9\u30b1\u30c3\u30c8\u30b5\u30d6\u30b7\u30b9\u30c6\u30e0\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306aPS / 2\u307e\u305f\u306fUSB\u30ad\u30fc\u30dc\u30fc\u30c9\u969c\u5bb3\u3002;\u30ea\u30e0\u30fc\u30d0\u30d6\u30eb\u30d6\u30fc\u30c8\u30e1\u30c7\u30a3\u30a2\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30d3\u30c7\u30aa\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u30d3\u30c7\u30aa\u30c7\u30d0\u30a4\u30b9\u304c\u691c\u51fa\u3055\u308c\u307e\u305b\u3093\u3002;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\uff08BIOS\uff09ROM\u7834\u640d\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002; CPU\u96fb\u5727\u306e\u4e0d\u4e00\u81f4\uff08\u540c\u3058\u96fb\u6e90\u3092\u5171\u6709\u3059\u308b\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc\u306e\u96fb\u5727\u8981\u4ef6\u304c\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093\uff09; CPU\u901f\u5ea6\u306e\u4e00\u81f4\u306e\u5931\u6557".split(";"),
160 -m="\u6307\u5b9a\u306a\u3057\u3002;\u30e1\u30e2\u30ea\u306e\u521d\u671f\u5316\u3002;\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u306e\u521d\u671f\u5316\u3068\u30c6\u30b9\u30c8\u306e\u958b\u59cb;\u30bb\u30ab\u30f3\u30c0\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u521d\u671f\u5316;\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c;\u30e6\u30fc\u30b6\u30fc\u304c\u958b\u59cb\u3057\u305f\u30b7\u30b9\u30c6\u30e0\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7; USB\u30ea\u30bd\u30fc\u30b9\u69cb\u6210; PCI\u30ea\u30bd\u30fc\u30b9\u69cb\u6210;\u30aa\u30d7\u30b7\u30e7\u30f3ROM\u306e\u521d\u671f\u5316;\u30d3\u30c7\u30aa\u306e\u521d\u671f\u5316;\u30ad\u30e3\u30c3\u30b7\u30e5\u306e\u521d\u671f\u5316; SM\u30d0\u30b9\u306e\u521d\u671f\u5316;\u30ad\u30fc\u30dc\u30fc\u30c9\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u521d\u671f\u5316;\u7d44\u307f\u8fbc\u307f\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc/\u7ba1\u7406\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u306e\u521d\u671f\u5316;\u30c9\u30c3\u30ad\u30f3\u30b0\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u63a5\u7d9a\u306e\u6709\u52b9\u5316;\u30c9\u30c3\u30ad\u30f3\u30b0\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u30a4\u30cd\u30fc\u30d6\u30ea\u30f3\u30b0;\u30c9\u30c3\u30ad\u30f3\u30b0\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u6392\u51fa;\u30c9\u30c3\u30ad\u30f3\u30b0\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u7121\u52b9\u5316;\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u30a6\u30a7\u30a4\u30af\u30a2\u30c3\u30d7\u30d9\u30af\u30c8\u30eb\u306e\u547c\u3073\u51fa\u3057;\u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u306e\u8d77\u52d5\u30d7\u30ed\u30bb\u30b9\u306e\u958b\u59cb;\u30d9\u30fc\u30b9\u30dc\u30fc\u30c9\u307e\u305f\u306f\u30de\u30b6\u30fc\u30dc\u30fc\u30c9\u306e\u521d\u671f\u5316;\u4e88\u7d04;\u30d5\u30ed\u30c3\u30d4\u30fc\u521d\u671f\u5316;\u30ad\u30fc\u30dc\u30fc\u30c9\u30c6\u30b9\u30c8;\u30dd\u30a4\u30f3\u30c6\u30a3\u30f3\u30b0\u30c7\u30d0\u30a4\u30b9\u30c6\u30b9\u30c8;\u30d7\u30e9\u30a4\u30de\u30ea\u30d7\u30ed\u30bb\u30c3\u30b5\u306e\u521d\u671f\u5316".split(";"),
158 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
159 +[a,b,[]])};var D="Unspecified\u3002;\u30b7\u30b9\u30c6\u30e0\u306b\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u7269\u7406\u7684\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002;\u4f7f\u7528\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30e1\u30e2\u30ea\u304c\u3042\u308a\u307e\u305b\u3093\u3002\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30e1\u30e2\u30ea\u306b\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af/ ATAPI / IDE\u30c7\u30d0\u30a4\u30b9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9\u306e\u30a8\u30e9\u30fc\u3002;\u56de\u5fa9\u4e0d\u53ef\u80fd\u306a\u30c7\u30a3\u30b9\u30b1\u30c3\u30c8\u30b5\u30d6\u30b7\u30b9\u30c6\u30e0\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30cf\u30fc\u30c9\u30c7\u30a3\u30b9\u30af\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u56de\u5fa9\u4e0d\u80fd\u306aPS / 2\u307e\u305f\u306fUSB\u30ad\u30fc\u30dc\u30fc\u30c9\u969c\u5bb3\u3002;\u30ea\u30e0\u30fc\u30d0\u30d6\u30eb\u30d6\u30fc\u30c8\u30e1\u30c7\u30a3\u30a2\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002;\u56de\u5fa9\u4e0d\u80fd\u306a\u30d3\u30c7\u30aa\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u969c\u5bb3\u3002;\u30d3\u30c7\u30aa\u30c7\u30d0\u30a4\u30b9\u304c\u691c\u51fa\u3055\u308c\u307e\u305b\u3093\u3002;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\uff08BIOS\uff09ROM\u7834\u640d\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002; CPU\u96fb\u5727\u306e\u4e0d\u4e00\u81f4\uff08\u540c\u3058\u96fb\u6e90\u3092\u5171\u6709\u3059\u308b\u30d7\u30ed\u30bb\u30c3\u30b5\u30fc\u306e\u96fb\u5727\u8981\u4ef6\u304c\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093\uff09; CPU\u901f\u5ea6\u306e\u4e00\u81f4\u306e\u5931\u6557".split(";"),
160 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
161 k="\u672a\u6307\u5b9a;\u305d\u306e\u4ed6;\u4e0d\u660e;\u30d7\u30ed\u30bb\u30c3\u30b5;\u30c7\u30a3\u30b9\u30af;\u5468\u8fba\u6a5f\u5668;\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u30e2\u30b8\u30e5\u30fc\u30eb;\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9;\u30e1\u30e2\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb;\u30d7\u30ed\u30bb\u30c3\u30b5\u30e2\u30b8\u30e5\u30fc\u30eb;\u96fb\u6e90\u88c5\u7f6e;\u30ab\u30fc\u30c9\u306b\u8ffd\u52a0;\u30d5\u30ed\u30f3\u30c8\u30d1\u30cd\u30eb\u30dc\u30fc\u30c9;\u30d0\u30c3\u30af\u30d1\u30cd\u30eb\u30dc\u30fc\u30c9;\u96fb\u6e90\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9;\u30c9\u30e9\u30a4\u30d6\u30d0\u30c3\u30af\u30d7\u30ec\u30fc\u30f3;\u30b7\u30b9\u30c6\u30e0\u5185\u90e8\u62e1\u5f35\u30dc\u30fc\u30c9;\u305d\u306e\u4ed6\u306e\u30b7\u30b9\u30c6\u30e0\u30dc\u30fc\u30c9;\u30d7\u30ed\u30bb\u30c3\u30b5\u30dc\u30fc\u30c9;\u96fb\u6e90\u30e6\u30cb\u30c3\u30c8;\u96fb\u6e90\u30e2\u30b8\u30e5\u30fc\u30eb;\u96fb\u6e90\u7ba1\u7406\u30dc\u30fc\u30c9;\u30b7\u30e3\u30fc\u30b7\u30d0\u30c3\u30af\u30d1\u30cd\u30eb\u30dc\u30fc\u30c9;\u30b7\u30b9\u30c6\u30e0\u30b7\u30e3\u30fc\u30b7;\u30b5\u30d6\u30b7\u30e3\u30fc\u30b7;\u305d\u306e\u4ed6\u306e\u30b7\u30e3\u30fc\u30b7\u30dc\u30fc\u30c9;\u30c7\u30a3\u30b9\u30af\u30d9\u30a4;\u5468\u8fba\u6a5f\u5668\u30d9\u30a4;\u30c7\u30d0\u30a4\u30b9\u30d9\u30a4;\u30d5\u30a1\u30f3\u51b7\u5374;\u51b7\u5374\u30e6\u30cb\u30c3\u30c8;\u30b1\u30fc\u30d6\u30eb\u76f8\u4e92\u63a5\u7d9a;\u30e1\u30e2\u30ea\u30c7\u30d0\u30a4\u30b9;\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2; BIOS ; Intel\uff08r\uff09ME ;\u30b7\u30b9\u30c6\u30e0\u30d0\u30b9;\u30b0\u30eb\u30fc\u30d7; Intel\uff08r\uff09ME ;\u5916\u90e8\u74b0\u5883;\u30d0\u30c3\u30c6\u30ea\u30fc;\u51e6\u7406\u30d6\u30ec\u30fc\u30c9;\u63a5\u7d9a\u30b9\u30a4\u30c3\u30c1;\u30d7\u30ed\u30bb\u30c3\u30b5/\u30e1\u30e2\u30ea\u30e2\u30b8\u30e5\u30fc\u30eb; I / O\u30e2\u30b8\u30e5\u30fc\u30eb;\u30d7\u30ed\u30bb\u30c3\u30b5I / O\u30e2\u30b8\u30e5\u30fc\u30eb;\u7ba1\u7406\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2; IPMI\u30c1\u30e3\u30cd\u30eb; PCI\u30d0\u30b9; PCI\u30a8\u30af\u30b9\u30d7\u30ec\u30b9\u30d0\u30b9; SCSI\u30d0\u30b9; SATA / SAS\u30d0\u30b9;\u30d7\u30ed\u30bb\u30c3\u30b5\u30d5\u200b\u200b\u30ed\u30f3\u30c8\u30b5\u30a4\u30c9\u30d0\u30b9".split(";");
162 -h.RealmNames=";;\u30ea\u30c0\u30a4\u30ec\u30af\u30c8;;\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30a2\u30bb\u30c3\u30c8;\u30ea\u30e2\u30fc\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30b9\u30c8\u30ec\u30fc\u30b8;\u30a4\u30d9\u30f3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3;\u30b9\u30c8\u30ec\u30fc\u30b8\u7ba1\u7406;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ed\u30fc\u30ab\u30eb;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ea\u30e2\u30fc\u30c8;\u56de\u8def\u906e\u65ad\u5668;\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6642\u9593;\u4e00\u822c\u60c5\u5831;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u66f4\u65b0; EIT ; LocalUN ;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7ba1\u7406;\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u30ea\u30fc\u30c0\u30fc;\u76e3\u67fb\u30ed\u30b0; ACL\u30ec\u30eb\u30e0;;;\u30ed\u30fc\u30ab\u30eb\u30b7\u30b9\u30c6\u30e0".split(";");
163 -h.WatchdogCurrentStates={1:"\u59cb\u307e\u3063\u3066\u3044\u306a\u3044",2:"\u505c\u6b62",4:"\u30e9\u30f3\u30cb\u30f3\u30b0",8:"\u671f\u9650\u5207\u308c",16:"\u4e00\u6642\u505c\u6b62"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
164 -O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7ba1\u7406\u8005",17:"RCO",18:"\u30ea\u30c0\u30a4\u30ec\u30af\u30b7\u30e7\u30f3\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",19:"\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u66f4\u65b0\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",20:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",21:"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6642\u9593",22:"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7ba1\u7406",23:"\u30b9\u30c8\u30ec\u30fc\u30b8\u7ba1\u7406",
162 +g.RealmNames=";;\u30ea\u30c0\u30a4\u30ec\u30af\u30c8;;\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u30a2\u30bb\u30c3\u30c8;\u30ea\u30e2\u30fc\u30c8\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30b9\u30c8\u30ec\u30fc\u30b8;\u30a4\u30d9\u30f3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3;\u30b9\u30c8\u30ec\u30fc\u30b8\u7ba1\u7406;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ed\u30fc\u30ab\u30eb;\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30ea\u30e2\u30fc\u30c8;\u56de\u8def\u906e\u65ad\u5668;\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6642\u9593;\u4e00\u822c\u60c5\u5831;\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u66f4\u65b0; EIT ; LocalUN ;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb;\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u30a2\u30af\u30bb\u30b9\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7ba1\u7406;\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u30ea\u30fc\u30c0\u30fc;\u76e3\u67fb\u30ed\u30b0; ACL\u30ec\u30eb\u30e0;;;\u30ed\u30fc\u30ab\u30eb\u30b7\u30b9\u30c6\u30e0".split(";");
163 +g.WatchdogCurrentStates={1:"\u59cb\u307e\u3063\u3066\u3044\u306a\u3044",2:"\u505c\u6b62",4:"\u30e9\u30f3\u30cb\u30f3\u30b0",8:"\u671f\u9650\u5207\u308c",16:"\u4e00\u6642\u505c\u6b62"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
164 +O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7ba1\u7406\u8005",17:"RCO",18:"\u30ea\u30c0\u30a4\u30ec\u30af\u30b7\u30e7\u30f3\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",19:"\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u66f4\u65b0\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",20:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",21:"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u6642\u9593",22:"\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7ba1\u7406",23:"\u30b9\u30c8\u30ec\u30fc\u30b8\u7ba1\u7406",
165 24:"\u30a4\u30d9\u30f3\u30c8\u30de\u30cd\u30fc\u30b8\u30e3",25:"\u30b5\u30fc\u30ad\u30c3\u30c8\u30d6\u30ec\u30fc\u30ab\u30fc\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",26:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30de\u30cd\u30fc\u30b8\u30e3\u30fc",27:"\u30ef\u30a4\u30e4\u30ec\u30b9\u69cb\u6210",28:"EAC",29:"KVM",30:"\u30e6\u30fc\u30b6\u30fc\u306e\u30aa\u30d7\u30c8\u30a4\u30f3\u30a4\u30d9\u30f3\u30c8",32:"\u753b\u9762\u306e\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0",33:"\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a4\u30d9\u30f3\u30c8",
166 1600:"\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u304c\u958b\u59cb\u3055\u308c\u307e\u3057\u305f",1601:"\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f",1602:"\u8ffd\u52a0\u3055\u308c\u305fACL\u30a8\u30f3\u30c8\u30ea",1603:"ACL\u30a8\u30f3\u30c8\u30ea\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",1604:"\u524a\u9664\u3055\u308c\u305fACL\u30a8\u30f3\u30c8\u30ea",1605:"\u7121\u52b9\u306a\u8a8d\u8a3c\u60c5\u5831\u306b\u3088\u308bACL\u30a2\u30af\u30bb\u30b9",
167 1606:"ACL\u30a8\u30f3\u30c8\u30ea\u306e\u72b6\u614b",1607:"TLS\u72b6\u614b\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",1608:"TLS\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u30bb\u30c3\u30c8",1609:"TLS\u30b5\u30fc\u30d0\u30fc\u8a3c\u660e\u66f8\u306e\u524a\u9664",1610:"TLS\u4fe1\u983c\u3055\u308c\u305f\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",1611:"TLS\u4fe1\u983c\u3055\u308c\u305f\u30eb\u30fc\u30c8\u8a3c\u660e\u66f8\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f",
168 1612:"TLS\u4e8b\u524d\u5171\u6709\u30ad\u30fc\u30bb\u30c3\u30c8",1613:"\u5909\u66f4\u3055\u308c\u305fKerberos\u8a2d\u5b9a",1614:"\u5909\u66f4\u3055\u308c\u305fKerberos\u30e1\u30a4\u30f3\u30ad\u30fc",1615:"\u30d5\u30e9\u30c3\u30b7\u30e5\u6469\u8017\u30ab\u30a6\u30f3\u30bf\u30fc\u306e\u30ea\u30bb\u30c3\u30c8",1616:"\u30d1\u30ef\u30fc\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",1617:"\u30ec\u30eb\u30e0\u8a8d\u8a3c\u30e2\u30fc\u30c9\u3092\u8a2d\u5b9a\u3059\u308b",1618:"\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u7ba1\u7406\u5236\u5fa1\u30e2\u30fc\u30c9\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9",
169 -1619:"\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u89e3\u9664\u3092\u958b\u59cb\u3057\u307e\u3057\u305f",1700:"\u5b9f\u884c\u3055\u308c\u305f\u30d1\u30ef\u30fc\u30a2\u30c3\u30d7",1701:"\u30d1\u30ef\u30fc\u30c0\u30a6\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3057\u305f",1702:"\u5b9f\u884c\u3055\u308c\u305f\u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb",1703:"\u30ea\u30bb\u30c3\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3057\u305f",1704:"\u30d6\u30fc\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a",1800:"IDER\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3055\u308c\u307e\u3057\u305f",
170 -1801:"IDER\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f",1802:"IDER\u304c\u6709\u52b9",1803:"IDER\u7121\u52b9",1804:"SoL\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3055\u308c\u307e\u3057\u305f",1805:"SoL\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f",1806:"SoL\u304c\u6709\u52b9",1807:"SoL\u7121\u52b9",1808:"KVM\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3057\u307e\u3057\u305f",1809:"KVM\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f",
171 -1810:"KVM\u304c\u6709\u52b9",1811:"KVM\u7121\u52b9",1812:"VNC\u30d1\u30b9\u30ef\u30fc\u30c9\u304c3\u56de\u5931\u6557\u3057\u305f",1900:"\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u304c\u66f4\u65b0\u3055\u308c\u307e\u3057\u305f",1901:"\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f",2E3:"\u30af\u30ea\u30a2\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",2001:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30dd\u30ea\u30b7\u30fc\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",
172 -2002:"\u7121\u52b9\u5316\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",2003:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0\u304c\u6709\u52b9",2004:"\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",2005:"\u56de\u5fa9\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",2100:"\u30a4\u30f3\u30c6\u30eb&reg;ME\u30bf\u30a4\u30e0\u30bb\u30c3\u30c8",2200:"TCPIP\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8",
173 -2201:"\u30db\u30b9\u30c8\u540d\u30bb\u30c3\u30c8",2202:"\u30c9\u30e1\u30a4\u30f3\u540d\u30bb\u30c3\u30c8",2203:"VLAN\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8",2204:"\u30ea\u30f3\u30af\u30dd\u30ea\u30b7\u30fc\u30bb\u30c3\u30c8",2205:"IPv6\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8",2300:"\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30c8\u30ec\u30fc\u30b8\u5c5e\u6027\u30bb\u30c3\u30c8",2301:"\u30b9\u30c8\u30ec\u30fc\u30b8EACL\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",2302:"\u30b9\u30c8\u30ec\u30fc\u30b8FPACL\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",
174 -2303:"\u30b9\u30c8\u30ec\u30fc\u30b8\u66f8\u304d\u8fbc\u307f\u64cd\u4f5c",2400:"\u30a2\u30e9\u30fc\u30c8\u304c\u767b\u9332\u3055\u308c\u307e\u3057\u305f",2401:"\u672a\u767b\u9332\u306e\u30a2\u30e9\u30fc\u30c8",2402:"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f",2403:"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u306e\u51cd\u7d50",2500:"\u8ffd\u52a0\u3055\u308c\u305fCB\u30d5\u30a3\u30eb\u30bf\u30fc",2501:"\u524a\u9664\u3055\u308c\u305fCB\u30d5\u30a3\u30eb\u30bf\u30fc",
175 -2502:"\u8ffd\u52a0\u3055\u308c\u305fCB\u30dd\u30ea\u30b7\u30fc",2503:"\u524a\u9664\u3055\u308c\u305fCB\u30dd\u30ea\u30b7\u30fc",2504:"CB\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30ea\u30b7\u30fc\u30bb\u30c3\u30c8",2505:"CB\u30d2\u30e5\u30fc\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\u30aa\u30d7\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8",2506:"CB\u30d2\u30e5\u30fc\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\u30b9\u72b6\u614b\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f",2600:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",
176 -2601:"\u524a\u9664\u3055\u308c\u305f\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0",2602:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8",2700:"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",2701:"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f",2702:"\u66f4\u65b0\u3055\u308c\u305f\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",
169 +1619:"\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u89e3\u9664\u3092\u958b\u59cb\u3057\u307e\u3057\u305f",1700:"\u5b9f\u884c\u3055\u308c\u305f\u30d1\u30ef\u30fc\u30a2\u30c3\u30d7",1701:"\u30d1\u30ef\u30fc\u30c0\u30a6\u30f3\u3092\u5b9f\u884c\u3057\u307e\u3057\u305f",1702:"\u5b9f\u884c\u3055\u308c\u305f\u30d1\u30ef\u30fc\u30b5\u30a4\u30af\u30eb",1703:"\u30ea\u30bb\u30c3\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3057\u305f",1704:"\u30d6\u30fc\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a2d\u5b9a",1705:"Remote graceful power down initiated",
170 +1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"IDER\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3055\u308c\u307e\u3057\u305f",1801:"IDER\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f",1802:"IDER\u304c\u6709\u52b9",1803:"IDER\u7121\u52b9",1804:"SoL\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3055\u308c\u307e\u3057\u305f",1805:"SoL\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f",
171 +1806:"SoL\u304c\u6709\u52b9",1807:"SoL\u7121\u52b9",1808:"KVM\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u958b\u59cb\u3057\u307e\u3057\u305f",1809:"KVM\u30bb\u30c3\u30b7\u30e7\u30f3\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f",1810:"KVM\u304c\u6709\u52b9",1811:"KVM\u7121\u52b9",1812:"VNC\u30d1\u30b9\u30ef\u30fc\u30c9\u304c3\u56de\u5931\u6557\u3057\u305f",1900:"\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u304c\u66f4\u65b0\u3055\u308c\u307e\u3057\u305f",1901:"\u30d5\u30a1\u30fc\u30e0\u30a6\u30a7\u30a2\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f",
172 +2E3:"\u30af\u30ea\u30a2\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",2001:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30dd\u30ea\u30b7\u30fc\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",2002:"\u7121\u52b9\u5316\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",2003:"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0\u304c\u6709\u52b9",2004:"\u30a8\u30af\u30b9\u30dd\u30fc\u30c8\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",
173 +2005:"\u56de\u5fa9\u3055\u308c\u305f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u76e3\u67fb\u30ed\u30b0",2100:"\u30a4\u30f3\u30c6\u30eb&reg;ME\u30bf\u30a4\u30e0\u30bb\u30c3\u30c8",2200:"TCPIP\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8",2201:"\u30db\u30b9\u30c8\u540d\u30bb\u30c3\u30c8",2202:"\u30c9\u30e1\u30a4\u30f3\u540d\u30bb\u30c3\u30c8",2203:"VLAN\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8",2204:"\u30ea\u30f3\u30af\u30dd\u30ea\u30b7\u30fc\u30bb\u30c3\u30c8",2205:"IPv6\u30d1\u30e9\u30e1\u30fc\u30bf\u30bb\u30c3\u30c8",
174 +2300:"\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30c8\u30ec\u30fc\u30b8\u5c5e\u6027\u30bb\u30c3\u30c8",2301:"\u30b9\u30c8\u30ec\u30fc\u30b8EACL\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",2302:"\u30b9\u30c8\u30ec\u30fc\u30b8FPACL\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",2303:"\u30b9\u30c8\u30ec\u30fc\u30b8\u66f8\u304d\u8fbc\u307f\u64cd\u4f5c",2400:"\u30a2\u30e9\u30fc\u30c8\u304c\u767b\u9332\u3055\u308c\u307e\u3057\u305f",2401:"\u672a\u767b\u9332\u306e\u30a2\u30e9\u30fc\u30c8",2402:"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f",
175 +2403:"\u30a4\u30d9\u30f3\u30c8\u30ed\u30b0\u306e\u51cd\u7d50",2500:"\u8ffd\u52a0\u3055\u308c\u305fCB\u30d5\u30a3\u30eb\u30bf\u30fc",2501:"\u524a\u9664\u3055\u308c\u305fCB\u30d5\u30a3\u30eb\u30bf\u30fc",2502:"\u8ffd\u52a0\u3055\u308c\u305fCB\u30dd\u30ea\u30b7\u30fc",2503:"\u524a\u9664\u3055\u308c\u305fCB\u30dd\u30ea\u30b7\u30fc",2504:"CB\u30c7\u30d5\u30a9\u30eb\u30c8\u30dd\u30ea\u30b7\u30fc\u30bb\u30c3\u30c8",2505:"CB\u30d2\u30e5\u30fc\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\u30aa\u30d7\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8",
176 +2506:"CB\u30d2\u30e5\u30fc\u30ea\u30b9\u30c6\u30a3\u30c3\u30af\u30b9\u72b6\u614b\u304c\u30af\u30ea\u30a2\u3055\u308c\u307e\u3057\u305f",2600:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",2601:"\u524a\u9664\u3055\u308c\u305f\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0",2602:"\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u30a2\u30af\u30b7\u30e7\u30f3\u30bb\u30c3\u30c8",
177 +2700:"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f",2701:"\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u304c\u524a\u9664\u3055\u308c\u307e\u3057\u305f",2702:"\u66f4\u65b0\u3055\u308c\u305f\u30ef\u30a4\u30e4\u30ec\u30b9\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",
178 2800:"EAC\u59ff\u52e2\u7f72\u540d\u8005\u30bb\u30c3\u30c8",2801:"EAC\u6709\u52b9",2802:"EAC\u7121\u52b9",2803:"EAC\u59ff\u52e2\u72b6\u614b",2804:"EAC\u30bb\u30c3\u30c8\u30aa\u30d7\u30b7\u30e7\u30f3",2900:"KVM\u30aa\u30d7\u30c8\u30a4\u30f3\u304c\u6709\u52b9",2901:"KVM\u30aa\u30d7\u30c8\u30a4\u30f3\u7121\u52b9",2902:"KVM\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f",2903:"KVM\u306e\u540c\u610f\u306b\u6210\u529f\u3057\u307e\u3057\u305f",2904:"KVM\u540c\u610f\u306b\u5931\u6557\u3057\u307e\u3057\u305f",
178 -3E3:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30dd\u30ea\u30b7\u30fc\u306e\u5909\u66f4",3001:"\u540c\u610f\u30b3\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u306e\u9001\u4fe1",3002:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30d6\u30ed\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306e\u958b\u59cb"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\u7121\u52b9\u306aME\u30a2\u30af\u30bb\u30b9",
179 -"\u7121\u52b9\u306aMEBx\u30a2\u30af\u30bb\u30b9"][b.charCodeAt(0)];if(1606==a){var c=["\u7121\u52b9","\u6709\u52b9"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+="\u3001"+b.substring(3));return c}return 1607==a?"\u30ea\u30e2\u30fc\u30c8"+["NoAuth","ServerAuth","\u76f8\u4e92\u8a8d\u8a3c"][b.charCodeAt(0)]+"\u3001 \u5730\u5143"+["NoAuth","ServerAuth","\u76f8\u4e92\u8a8d\u8a3c"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+"\u3001"+["NoAuth","Auth","\u7121\u52b9"][b.charCodeAt(4)]:1619==a?["BIOS",
180 -"MEBx","\u30ed\u30fc\u30ab\u30ebMEI","\u30ed\u30fc\u30ab\u30ebWSMAN","\u30ea\u30e2\u30fc\u30c8WSAMN"][b.charCodeAt(0)]:1900==a?"\u304b\u3089"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u306b"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\u304b\u3089"+["\u7121\u3057","KVM","\u3059\u3079\u3066"][b.charCodeAt(0)]+" \u306b"+["\u7121\u3057",
181 -"KVM","\u3059\u3079\u3066"][b.charCodeAt(1)]:3001==a?["\u6210\u529f","3\u56de\u5931\u6557"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
179 +3E3:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30dd\u30ea\u30b7\u30fc\u306e\u5909\u66f4",3001:"\u540c\u610f\u30b3\u30fc\u30c9\u30a4\u30d9\u30f3\u30c8\u306e\u9001\u4fe1",3002:"\u30aa\u30d7\u30c8\u30a4\u30f3\u30d6\u30ed\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306e\u958b\u59cb",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,
180 +2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\u7121\u52b9\u306aME\u30a2\u30af\u30bb\u30b9","\u7121\u52b9\u306aMEBx\u30a2\u30af\u30bb\u30b9"][b.charCodeAt(0)];if(1606==a){var c=["\u7121\u52b9","\u6709\u52b9"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+="\u3001"+b.substring(3));return c}return 1607==a?"\u30ea\u30e2\u30fc\u30c8"+["NoAuth","ServerAuth","\u76f8\u4e92\u8a8d\u8a3c"][b.charCodeAt(0)]+"\u3001 \u5730\u5143"+["NoAuth","ServerAuth","\u76f8\u4e92\u8a8d\u8a3c"][b.charCodeAt(1)]:
181 +1617==a?g.RealmNames[ReadInt(b,0)]+"\u3001"+["NoAuth","Auth","\u7121\u52b9"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\u30ed\u30fc\u30ab\u30ebMEI","\u30ed\u30fc\u30ab\u30ebWSMAN","\u30ea\u30e2\u30fc\u30c8WSAMN"][b.charCodeAt(0)]:1900==a?"\u304b\u3089"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u306b"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):
182 +3E3==a?"\u304b\u3089"+["\u7121\u3057","KVM","\u3059\u3079\u3066"][b.charCodeAt(0)]+" \u306b"+["\u7121\u3057","KVM","\u3059\u3079\u3066"][b.charCodeAt(1)]:3001==a?["\u6210\u529f","3\u56de\u5931\u6557"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
183 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
184 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
185 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
186 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
187 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
187 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
188 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
189 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
190 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
191 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
192 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
193 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
194 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
195 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
188 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
189 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
190 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
191 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
192 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
193 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
194 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
195 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
196 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
197 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
198 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
199 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -203,10 +204,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
204 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
205 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
206 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
206 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
207 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
208 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
208 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
209 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
209 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
210 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
211 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
212 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
213 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -216,69 +217,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
217 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
218 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
219 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
219 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
220 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
221 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
222 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
223 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
224 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
225 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
226 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
220 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
221 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
222 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
223 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
224 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
225 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
226 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
227 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
228 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
228 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
229 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
230 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
231 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
232 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
233 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
234 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
235 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
236 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
237 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
238 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
239 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
240 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
241 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
229 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
230 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
231 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
232 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
233 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
234 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
235 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
236 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
237 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
238 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
239 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
240 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
241 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
242 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
243 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
244 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
245 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
246 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
246 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
247 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
248 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
247 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
248 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
249 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
250 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
251 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
252 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
253 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
254 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
254 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
255 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
256 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
257 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
258 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
259 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
260 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
261 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
255 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
256 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
257 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
258 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
259 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
260 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
261 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
262 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
263 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
264 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
265 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
265 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
266 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
267 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
268 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
269 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
270 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
271 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
272 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
273 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
274 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
275 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
276 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
277 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
266 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
267 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
268 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
269 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
270 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
271 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
272 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
273 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
274 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
275 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
276 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
277 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
278 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
279 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
279 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
280 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
281 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
280 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
281 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
282 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
283 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
284 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
285 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -292,213 +293,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
293 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
294 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
295 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
295 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
296 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
297 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
297 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
298 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
299 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
300 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
301 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
302 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
303 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
304 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
298 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
299 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
300 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
301 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
302 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
303 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
304 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
305 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
306 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
306 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
307 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
308 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
307 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
308 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
309 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
310 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
311 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
311 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
312 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
313 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
313 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
314 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
315 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
315 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
316 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
317 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
318 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
319 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
320 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
321 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
322 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
323 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
324 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
325 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
326 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
327 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
316 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
317 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
318 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
319 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
320 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
321 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
322 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
323 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
324 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
325 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
326 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
327 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
328 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
329 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
329 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
330 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
331 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
332 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
333 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
334 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
335 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
336 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
337 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
330 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
331 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
332 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
333 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
334 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
335 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
336 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
337 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
338 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
339 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
340 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
341 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
342 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
343 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
344 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
344 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
345 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
346 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
347 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
348 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
349 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
345 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
346 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
347 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
348 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
349 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
350 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
351 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
351 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
352 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
353 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
353 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
354 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
355 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
356 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
357 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
358 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
359 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
360 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
361 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
362 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
354 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
355 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
356 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
357 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
358 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
359 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
360 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
361 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
362 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
363 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
364 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
364 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
365 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
366 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
367 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
368 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
365 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
366 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
367 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
368 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
369 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
370 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
371 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
372 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
372 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
373 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
374 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
375 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
376 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
376 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
377 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
378 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
379 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
380 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
381 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
382 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
377 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
378 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
379 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
380 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
381 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
382 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
383 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
384 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
384 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
385 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
386 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
387 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
388 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
385 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
386 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
387 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
388 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
389 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
390 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
390 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
391 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
392 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
393 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
393 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
394 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
394 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
395 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
396 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
397 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
397 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
398 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
399 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
400 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
398 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
399 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
400 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
401 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
402 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
402 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
403 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
404 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
405 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
403 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
404 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
405 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
406 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
407 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
408 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
409 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
409 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
410 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
411 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
412 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
413 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
414 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
415 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
416 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
417 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
418 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
419 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
420 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
410 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
411 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
412 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
413 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
414 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
415 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
416 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
417 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
418 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
419 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
420 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
421 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
422 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
422 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
423 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
424 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
423 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
424 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
425 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
426 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
426 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
427 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
428 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
429 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
430 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
427 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
428 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
429 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
430 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
431 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
432 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
432 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
433 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
434 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
434 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
435 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
436 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
435 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
436 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
437 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
438 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
438 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
439 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
440 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
441 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
442 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
443 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
444 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
445 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
446 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
447 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
448 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
449 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
450 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
451 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
452 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
453 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
454 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
455 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
456 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
439 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
440 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
441 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
442 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
443 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
444 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
445 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
446 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
447 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
448 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
449 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
450 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
451 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
452 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
453 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
454 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
455 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
456 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
457 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
458 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
458 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
459 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
460 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
460 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
461 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
462 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
463 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
463 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
464 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
465 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
466 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
467 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
468 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
469 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
470 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
471 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
472 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
473 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
474 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
475 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
476 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
477 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
478 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
479 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
464 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
465 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
466 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
467 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
468 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
469 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
470 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
471 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
472 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
473 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
474 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
475 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
476 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
477 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
478 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
479 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
480 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
481 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
482 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
483 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
483 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
484 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
485 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
484 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
485 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
486 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
487 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
487 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
488 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
489 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
490 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
491 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
492 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
493 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
494 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
494 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
495 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
496 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
497 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
495 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
496 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
497 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
498 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
499 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
499 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
500 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
501 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
500 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
501 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
502 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
503 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
504 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
505 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -516,111 +517,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
517 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
518 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
519 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
519 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
520 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
521 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
522 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
520 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
521 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
522 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
523 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
524 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
524 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
525 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
526 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
527 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
528 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
525 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
526 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
527 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
528 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
529 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
530 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
530 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
531 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
532 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
533 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
534 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
534 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
535 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
535 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
536 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
537 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
538 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
539 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
539 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
540 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
541 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
542 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
543 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
544 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
545 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
546 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
546 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
547 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
548 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
548 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
549 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
550 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
551 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
552 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
553 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
554 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
555 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
549 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
550 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
551 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
552 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
553 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
554 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
555 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
556 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
557 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
558 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
558 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
559 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
560 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
560 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
561 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
562 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
562 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
563 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
564 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
565 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
566 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
567 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
568 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
569 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
563 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
564 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
565 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
566 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
567 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
568 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
569 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
570 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
571 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
572 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
572 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
573 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
574 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
575 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
576 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
573 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
574 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
575 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
576 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
577 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
578 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
578 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
579 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
580 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
581 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
582 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
583 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
584 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
585 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
586 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
587 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
588 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
589 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
590 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
591 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
592 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
593 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
579 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
580 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
581 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
582 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
583 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
584 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
585 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
586 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
587 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
588 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
589 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
590 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
591 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
592 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
593 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
594 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
595 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
595 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
596 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
597 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
598 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
599 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
600 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
596 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
597 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
598 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
599 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
600 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
601 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
602 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
603 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
603 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
604 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
604 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
605 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
606 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
606 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
607 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
608 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
608 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
609 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
610 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
611 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
612 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
613 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
609 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
610 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
611 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
612 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
613 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
614 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
615 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
615 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
616 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
617 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
616 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
617 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
618 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
619 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
620 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
621 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
622 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
623 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
623 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
624 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
625 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
626 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
627 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -631,20 +632,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
632 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
633 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
634 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
634 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
635 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
635 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
636 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
637 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
637 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
638 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
638 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
639 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
640 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
641 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
641 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
642 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
643 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
644 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
645 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
646 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
646 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
647 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
647 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
648 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
649 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
650 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
651 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -653,20 +654,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
654 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
655 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
656 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
656 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
657 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
658 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
659 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
660 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
661 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
661 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
662 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
663 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
664 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
665 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
666 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
662 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
663 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
664 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
665 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
666 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
667 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
668 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
668 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
669 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
669 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
670 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
671 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
672 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
673 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -690,17 +691,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
691 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
692 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
693 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
693 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
694 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
695 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
696 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
694 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
695 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
696 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
697 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
698 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
699 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
700 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
701 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
702 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
702 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
703 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
703 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
704 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
705 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
706 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
707 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -716,48 +717,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
717 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
718 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
719 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
719 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
720 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
721 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
722 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
723 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
724 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
725 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
726 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
726 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
727 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
728 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
729 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
730 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
730 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
731 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
732 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
732 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
733 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
734 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
735 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
735 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
736 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
737 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
738 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
739 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
740 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
740 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
741 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
742 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
743 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
741 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
742 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
743 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
744 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
745 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
746 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
747 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
748 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
749 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
749 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
750 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
751 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
751 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
752 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
753 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
752 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
753 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
754 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
755 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
756 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
757 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
757 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
758 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
759 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
759 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
760 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
760 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
761 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
762 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
763 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
764 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -765,119 +766,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
766 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
767 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
768 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
768 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
769 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
770 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
771 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
772 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
773 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
774 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
775 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
776 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
777 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
778 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
779 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
780 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
781 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
782 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
783 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
784 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
785 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
786 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
787 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
788 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
789 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
790 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
791 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
792 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
793 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
794 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
795 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
796 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
797 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
798 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
799 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
800 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
801 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
802 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
803 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
804 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
805 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
806 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
807 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
808 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
809 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
810 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
811 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
812 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
813 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
814 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
815 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
816 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
817 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
818 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
819 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
820 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
821 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
822 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
823 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
824 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
825 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
826 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
827 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
828 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
829 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
830 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
831 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
832 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
833 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
834 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
835 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
836 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
837 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
838 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
839 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
840 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
841 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
842 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
843 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
844 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
845 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
846 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
847 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
848 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
849 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
850 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
851 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
852 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
853 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
854 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
855 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
856 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
857 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
858 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
859 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
860 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
861 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
862 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
769 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
770 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
771 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
772 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
773 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
774 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
775 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
776 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
777 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
778 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
779 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
780 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
781 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
782 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
783 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
784 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
785 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
786 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
787 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
788 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
789 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
790 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
791 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
792 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
793 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
794 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
795 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
796 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
797 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
798 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
799 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
800 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
801 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
802 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
803 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
804 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
805 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
806 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
807 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
808 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
809 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
810 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
811 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
812 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
813 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
814 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
815 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
816 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
817 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
818 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
819 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
820 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
821 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
822 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
823 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
824 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
825 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
826 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
827 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
828 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
829 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
830 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
831 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
832 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
833 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
834 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
835 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
836 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
837 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
838 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
839 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
840 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
841 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
842 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
843 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
844 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
845 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
846 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
847 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
848 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
849 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
850 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
851 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
852 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
853 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
854 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
855 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
856 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
857 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
858 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
859 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
860 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
861 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
862 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
863 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
864 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
865 +l.Init();return l},ZLIB=ZLIB||{};
866 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
867 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
865 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
866 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
867 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
868 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
869 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
870 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
871 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
869 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
870 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
872 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
873 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
874 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
875 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
873 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
874 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
875 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
876 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
876 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
877 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
878 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
879 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
880 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
881 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
879 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
880 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
882 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
883 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
884 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
885 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
886 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -899,22 +902,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
902 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
903 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
904 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
902 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
903 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
904 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
905 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
906 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
905 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
906 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
907 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
908 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
909 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
910 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
911 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
912 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
913 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
914 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
912 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
913 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
915 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
916 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
917 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
915 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
916 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
917 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
918 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
919 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
920 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
921 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
922 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
923 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -930,16 +933,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
933 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
934 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
935 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
933 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
934 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
935 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
936 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
937 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
938 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
939 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
936 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
937 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
938 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
939 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
940 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
941 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
942 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
943 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
941 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
942 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
944 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
945 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
946 StatusStrs=["\u5207\u65ad\u3055\u308c\u305f","\u63a5\u7d9a\u3057\u3066\u3044\u307e\u3059...","\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7...","\u63a5\u7d9a\u3055\u308c\u3066\u3044\u307e\u3059"],t,t2,rsepass=null;
947 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
948 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -974,16 +977,16 @@ function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=T
977 amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=["\u3001 \u5dee\u3057\u8fbc\u3080","\u3001 \u96fb\u6c60\u3067"][v.PowerSource]);d+=TableEntry("\u529b",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u7121\u3057</i>":EscapeHtml(c);d+=TableEntry("\u540d\u524d\u3068\u30c9\u30e1\u30a4\u30f3",
978 addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\u30b7\u30b9\u30c6\u30e0ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\u30b7\u30b9\u30c6\u30e0ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \u7ba1\u7406\u5236\u5fa1\u30e2\u30fc\u30c9\uff08ACM\uff09\u3067\u30a2\u30af\u30c6\u30a3\u30d6\u5316",
979 4==l.ProvisioningMode&&(n=" \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5236\u5fa1\u30e2\u30fc\u30c9\uff08CCM\uff09\u3067\u30a2\u30af\u30c6\u30a3\u30d6\u5316",b=9));d+=TableEntry("\u30a4\u30f3\u30c6\u30eb&reg;ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),
977 -QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==
978 -amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+="\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30dd\u30fc\u30c8");q&&(e+="\u3001Serial-over-LAN");n&&(e+="\u3001IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8");h&&(e+="\u3001KVM");""==e&&(e=" \u7121\u3057");d+=TableEntry("\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u6a5f\u80fd",
980 +QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==
981 +amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);q&&(e+="\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u30dd\u30fc\u30c8");p&&(e+="\u3001Serial-over-LAN");n&&(e+="\u3001IDE\u30ea\u30c0\u30a4\u30ec\u30af\u30c8");g&&(e+="\u3001KVM");""==e&&(e=" \u7121\u3057");d+=TableEntry("\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u6a5f\u80fd",
982 addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\u30d7\u30e9\u30a4\u30de\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\u30d7\u30e9\u30a4\u30de\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4","\u30bb\u30ab\u30f3\u30c0\u30ea\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4",
983 "\u7b2c3\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4"][n.DefaultScreen]),e='<span title="'+format("\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30ea\u30e2\u30fc\u30c8\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306f{0}\u3067\u3059",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\u3001\u30dd\u30fc\u30c85900\u304c\u6709\u52b9"),1==n.OptInPolicy&&(e+="\u3001"+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u79d2\u30aa\u30d7\u30c8\u30a4\u30f3":"2\u756a\u76ee\u306e\u30aa\u30d7\u30c8\u30a4\u30f3")),e+="\u3001"+
984 n.SessionTimeout+" \u5206"+(0<n.SessionTimeout?"s":"")+" \u30bb\u30c3\u30b7\u30e7\u30f3\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+="\u3001\u30d6\u30e9\u30f3\u30ad\u30f3\u30b0\u53ef\u80fd"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",addLinkConditional(e,"showDesktopSettingsDlg()",
982 -xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u4e0d\u660e\u306a\u72b6\u614b",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="\u4e0d\u8981"),1==p&&(e="KVM\u306b\u306e\u307f\u5fc5\u8981"),4294967295==p&&(e="\u5e38\u306b\u5fc5\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
985 +xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u4e0d\u660e\u306a\u72b6\u614b",q=amtsysstate.IPS_OptInService.response.OptInRequired,0==q&&(e="\u4e0d\u8981"),1==q&&(e="KVM\u306b\u306e\u307f\u5fc5\u8981"),4294967295==q&&(e="\u5e38\u306b\u5fc5\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
986 (e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u30e6\u30fc\u30b6\u30fc\u306e\u540c\u610f",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\u308f\u304b\u3089\u306a\u3044",1:"\u305d\u306e\u4ed6\u306e",2:"\u6709\u52b9",3:"\u7121\u52b9",4:"\u30b7\u30e3\u30c3\u30c8\u30c0\u30a6\u30f3",5:"\u9069\u7528\u3067\u304d\u307e\u305b\u3093",6:"\u6709\u52b9\u3060\u304c\u30aa\u30d5\u30e9\u30a4\u30f3",
987 7:"\u30c6\u30b9\u30c8\u4e2d",8:"\u636e\u3048\u7f6e\u304d",9:"\u4f11\u6b62",10:"\u8d77\u52d5",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"\u308f\u304b\u3089\u306a\u3044",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));
985 -if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("\u96fb\u6e90\u30dd\u30ea\u30b7\u30fc",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],
986 -'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u65e5\u4ed8\u6642\u523b",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3...","showPowerActionDlg()")+" ";e+=AddButton("\u72b6\u614b\u3092\u4fdd\u5b58...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
988 +if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("\u96fb\u6e90\u30dd\u30ea\u30b7\u30fc",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],
989 +'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u65e5\u4ed8\u6642\u523b",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3...","showPowerActionDlg()")+" ";e+=AddButton("\u72b6\u614b\u3092\u4fdd\u5b58...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
990 QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u3068\u3001\u3053\u306e\u30da\u30fc\u30b8\u304c\u4f7f\u7528\u3067\u304d\u306a\u304f\u306a\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002");d=d+"<br><h2>\u4e00\u822c\u8a2d\u5b9a</h2>"+TableStart();e="";"<i>\u7121\u3057</i>"!=c&&(1==v.SharedFQDN&&
991 (e="\u3001OS\u3068\u5171\u6709"),0==v.SharedFQDN&&(e="\u3001OS\u3068\u306f\u7570\u306a\u308a\u307e\u3059"));d+=TableEntry("\u540d\u524d\u3068\u30c9\u30e1\u30a4\u30f3",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="\u7121\u52b9";1==v.DDNSUpdateEnabled?c="\u305d\u308c\u305e\u308c\u6709\u52b9"+v.DDNSPeriodicUpdateInterval+" \u5206\u3001TTL\u306f"+v.DDNSTTL+" \u5206":1==v.DDNSUpdateByDHCPServerEnabled&&(c="DHCP\u30b5\u30fc\u30d0\u30fc\u306b\u3088\u308b\u66f4\u65b0");d+=TableEntry("\u30c0\u30a4\u30ca\u30df\u30c3\u30afDNS",
992 addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\u7121\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9":"\u6709\u7dda\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9")+"</h2>";d+=TableStart();d+=TableEntry("\u30ea\u30f3\u30af\u72b6\u614b",
@@ -993,8 +996,8 @@ d+=TableEntry("\u30e9\u30b8\u30aa\u5dde",xxRadioState[xxWireless.CIM_WiFiEndpoin
996 "\u6709\u52b9":"\u7121\u52b9","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\u6709\u52b9":"\u7121\u52b9",
997 "showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("ping\u306b\u5fdc\u7b54\u3059\u308b",addLinkConditional(["\u7121\u52b9","ICMP\u5fdc\u7b54","RMCP\u5fdc\u7b54","ICMP\u304a\u3088\u3073RMCP\u5fdc\u7b54"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=1==c.DHCPEnabled?"DHCP\u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3057\u3066\u81ea\u52d5":"\u9759\u7684IP\u30a2\u30c9\u30ec\u30b9",
998 1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4\u72b6\u614b",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4\u30a2\u30c9\u30ec\u30b9",isIpAddress(c.IPAddress,"\u7121\u3057"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4/\u30de\u30b9\u30af",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u7121\u3057")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4\u30c9\u30e1\u30a4\u30f3\u30cd\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc",
996 -e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u7121\u52b9",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u6709\u52b9\u3001\u81ea\u52d5\u304a\u3088\u3073\u624b\u52d5\u30a2\u30c9\u30ec\u30b9":
997 -"\u6709\u52b9\u3001\u81ea\u52d5\u30a2\u30c9\u30ec\u30b9");d+=TableEntry("IPv6\u72b6\u614b",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+="\u3001"),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6\u30a2\u30c9\u30ec\u30b9",addLink(ipv6addr,"showIPv6AddrDlg("+
999 +e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="\u7121\u52b9",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u6709\u52b9\u3001\u81ea\u52d5\u304a\u3088\u3073\u624b\u52d5\u30a2\u30c9\u30ec\u30b9":
1000 +"\u6709\u52b9\u3001\u81ea\u52d5\u30a2\u30c9\u30ec\u30b9");d+=TableEntry("IPv6\u72b6\u614b",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+="\u3001"),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6\u30a2\u30c9\u30ec\u30b9",addLink(ipv6addr,"showIPv6AddrDlg("+
1001 a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6\u30a2\u30c9\u30ec\u30b9","\u7121\u3057");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6\u30c7\u30d5\u30a9\u30eb\u30c8\u30eb\u30fc\u30bf\u30fc",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6\u30c9\u30e1\u30a4\u30f3\u30cd\u30fc\u30e0\u30b5\u30fc\u30d0\u30fc",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&
1002 (-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
1003 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
@@ -1044,8 +1047,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1047 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u7121\u52b9":"\u6709\u52b9",c&2&&(b+="\u3001\u30ed\u30c3\u30af"),c&4&&(b+="\u3001 \u307b\u307c\u3044\u3063\u3071\u3044"),c&8&&(b+="\u3001\u30d5\u30eb"),c&16&&(b+="\u3001NoKey"),c="<h1>\u76e3\u67fb\u30ed\u30b0\u8a2d\u5b9a</h1>"+TableStart(),c+=TableEntry("\u72b6\u614b",b),c+=TableEntry("\u30b9\u30c8\u30ec\u30fc\u30b8",a[0].CurrentNumberOfRecords+" \u8a18\u9332\uff09\u3001"+a[0].PercentageFree+"\uff05 \u81ea\u7531"),
1048 c+=TableEntry("\u4e0a\u66f8\u304d\u30dd\u30ea\u30b7\u30fc",2==a[0].OverwritePolicy?"\u3044\u3063\u3071\u3044\u306b\u306a\u3063\u305f\u3068\u304d\u306b\u30e9\u30c3\u30d7":"\u4e0a\u66f8\u304d\u3057\u306a\u3044"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1049 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\u30d5\u30a3\u30eb\u30bf" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\u30bb\u30fc\u30d6...","SaveAuditLog()")+AddButton("\u30ed\u30b0\u3092\u30af\u30ea\u30a2","ClearAuditLog()"))+"<br>");if(0==c.length)d="\u76e3\u67fb\u30ed\u30b0\u30a4\u30d9\u30f3\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002";
1047 -else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u6642\u9593</b><td class=r1 style=width:260px><b>\u30a4\u30cb\u30b7\u30a8\u30fc\u30bf</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\u3001"+v.Event);null!=v.ExStr&&
1048 -(n+="\u3001"+v.ExStr);""!=l&&""!=p&&(l+="\u3001");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1050 +else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u6642\u9593</b><td class=r1 style=width:260px><b>\u30a4\u30cb\u30b7\u30a8\u30fc\u30bf</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\u3001"+v.Event);null!=v.ExStr&&
1051 +(n+="\u3001"+v.ExStr);""!=l&&""!=q&&(l+="\u3001");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1052 function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT\u76e3\u67fb\u30ed\u30b0",auditLog)}function ClearAuditLog(b){QH(60,"\u76e3\u67fb\u30ed\u30b0\u3092\u6d88\u53bb\u3057\u307e\u3059\u304b\uff1f");setDialogMode(1,"\u76e3\u67fb\u30ed\u30b0",3,ClearAuditLogEx)}
1053 function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\u76e3\u67fb\u30ed\u30b0","\u30a8\u30e9\u30fc\uff1a"+d)}
1054 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u6642\u9593",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u30a4\u30cb\u30b7\u30a8\u30fc\u30bf",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u4f4f\u6240",a.NetAddress));d+=addHtmlValue("\u5fdc\u7528",a.AuditApp);d+=addHtmlValue("\u30a4\u30d9\u30f3\u30c8",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\u62e1\u5f35\u30c7\u30fc\u30bf",a.ExStr);else if(0<a.Ex.length){var e=
@@ -1101,7 +1104,7 @@ var watchdogEnabledStates="\u308f\u304b\u3089\u306a\u3044 \u305d\u306e\u4ed6\u30
1104 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("\u6700\u5927\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" \u30a6\u30a9\u30c3\u30c1\u30fb\u30c9\u30c3\u30b0\u30b9");b+=TableEntry("\u6700\u5927\u5408\u8a08\u30a2\u30af\u30b7\u30e7\u30f3",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \u884c\u52d5");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";
1105 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u30d7\u30ec\u30bc\u30f3\u30b9\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&
1106 ""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u524a\u9664..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+
1104 -"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+="\uff1a\u30ed\u30b0\u306b\u8a18\u9332\u3059\u308b\u30a4\u30d9\u30f3\u30c8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u8ffd\u52a0...","AddWatchdog()"));
1107 +"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" \uff1a\u30ed\u30b0\u306b\u8a18\u9332\u3059\u308b\u30a4\u30d9\u30f3\u30c8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0\u3092\u8ffd\u52a0...","AddWatchdog()"));
1108 b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"\u3059\u3079\u3066\u306e\u5dde";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1109 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\u8aac\u660e",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u76e3\u8996\u5bfe\u8c61\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u73fe\u5728\u306e\u72b6\u614b",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u6709\u52b9\u306a\u72b6\u614b",
1110 watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("\u8d77\u52d5\u9593\u9694",b.StartupInterval+" \u79d2");c+=addHtmlValue("\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u9593\u9694",b.TimeoutInterval+" \u79d2");setDialogMode(11,format("\u30a6\u30a9\u30c3\u30c1\u30c9\u30c3\u30b0{0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1209,8 +1212,8 @@ function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><
1212 function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1213 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u7de8\u96c6",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1214 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\u65b0\u3057\u3044\u30a2\u30ab\u30a6\u30f3\u30c8",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1212 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u30a2\u30ab\u30a6\u30f3\u30c8\u30a8\u30e9\u30fc","\u7121\u52b9\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||
1213 -3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1215 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u30a2\u30ab\u30a6\u30f3\u30c8\u30a8\u30e9\u30fc","\u7121\u52b9\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||
1216 +3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1217 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u7ba1\u7406\u8005</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1218 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\u30ed\u30fc\u30ab\u30eb\u306e\u307f","\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306e\u307f","\u3059\u3079\u3066\uff08\u30ed\u30fc\u30ab\u30eb\u304a\u3088\u3073\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff09"];
1219 function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\u540d\u524d",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\u72b6\u614b",1==xxAccountEnabledInfo[b].Enabled?"\u6709\u52b9":"\u7121\u52b9"));if(e==xxAccountAdminName)a+=addHtmlValue("\u8a31\u53ef","\u7ba1\u7406\u8005");else{var a=a+addHtmlValue("\u8a31\u53ef",xxUserPermissions[c.AccessPermission]),v="";if(0<=c.Realms.indexOf(3))v=
@@ -1228,8 +1231,8 @@ var desktopScreenInfo=null,desktopPollTimer=null,webRtcDesktop=null;
1231 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1232 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1233 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1231 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1232 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1234 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1235 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1236 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1237 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1238 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1240,14 +1243,16 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1243 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1244 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1245 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\u63a5\u7d9a\u3059\u308b":"\u5207\u65ad\u3059\u308b";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",
1243 -"The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,
1244 -200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\u3001Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u8a2d\u5b9a",3,showDesktopSettingsChanged))}
1246 +"The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7",
1247 +"KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1248 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\u3001Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}
1249 +function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u30ea\u30e2\u30fc\u30c8\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u8a2d\u5b9a",3,showDesktopSettingsChanged))}
1250 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1251 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1247 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1248 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1249 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1250 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1252 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1253 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1254 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1255 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1256 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1257 "8px"),center()))}
1258 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\u30ea\u30e2\u30fc\u30c8\u30ad\u30fc\u30dc\u30fc\u30c9\u5165\u529b",3,showDeskTypeEx,'<div>\u30c6\u30ad\u30b9\u30c8\u3092\u5165\u529b\u3057\u3066[OK]\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001US\u82f1\u8a9e\u30ad\u30fc\u30dc\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30ea\u30e2\u30fc\u30c8\u3067\u5165\u529b\u3057\u307e\u3059\u3002\u7d9a\u884c\u3059\u308b\u524d\u306b\u3001\u30ea\u30e2\u30fc\u30c8\u30ab\u30fc\u30bd\u30eb\u3092\u6b63\u3057\u3044\u4f4d\u7f6e\u306b\u7f6e\u3044\u3066\u304f\u3060\u3055\u3044\u3002<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1258,13 +1263,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1263 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1264 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1265 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1261 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1266 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1267 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1268 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1269 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1265 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u30eb\u30fc\u30c8</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+
1266 -'">'+EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1267 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1270 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u30eb\u30fc\u30c8</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+
1271 +'">'+EscapeHtml(q.substring(0,70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1272 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1273 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1274 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1275 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1398,10 +1403,10 @@ function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_
1403 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"\u96fb\u6e90\u64cd\u4f5c\u304c\u5b8c\u4e86\u3057\u307e\u3057\u305f\u3002"):QH(60,format("\u96fb\u6e90\u64cd\u4f5c\u30a8\u30e9\u30fc\uff03{0}\u3002",e));setDialogMode(1,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?
1404 (b="Intel&reg; Remote Secure Erase\u306e\u5b9f\u884c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u304b\uff1f<br>\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u3001Secure Erase\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u30d1\u30b9\u30ef\u30fc\u30c9</div></div><br><div style=color:red><b>\u8b66\u544a\uff1a</ b>\u3053\u308c\u306b\u3088\u308a\u3001\u30ea\u30e2\u30fc\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30fc\u30bf\u304c\u30ef\u30a4\u30d7\u3055\u308c\u307e\u3059\u3002</div>",
1405 rsepass=1,setDialogMode(11,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1401 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a\uff1a</ b>\u3053\u308c\u306b\u3088\u308a\u3001\u30ea\u30e2\u30fc\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30fc\u30bf\u304c\u30ef\u30a4\u30d7\u3055\u308c\u307e\u3059\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");
1402 -d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");
1403 -1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,
1404 -"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1406 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a\uff1a</ b>\u3053\u308c\u306b\u3088\u308a\u3001\u30ea\u30e2\u30fc\u30c8\u30b7\u30b9\u30c6\u30e0\u306e\u30c7\u30fc\u30bf\u304c\u30ef\u30a4\u30d7\u3055\u308c\u307e\u3059\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1407 +d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1408 +a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1409 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1410 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059..."),amtstack.Get("IPS_OptInService",
1411 powerActionResponse0,0,1)):powerActionDlg()}
1412 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\u30d1\u30ef\u30fc\u30a2\u30af\u30b7\u30e7\u30f3","\u72b6\u614b\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);
@@ -1439,11 +1444,11 @@ function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\u96fb\u6e90\u64cd\u4f5c\
1444 function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1445 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1446 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1442 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1443 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;
1444 -var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\u30eb\u30fc\u30c8";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" \u30d0\u30a4\u30c8</i></div></div>");
1445 -d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>");
1446 -v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093...<br/>"+AddButton("\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5","PullStorage()"))}
1447 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1448 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u3053\u306e\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30a4\u30f3\u30c6\u30eb&reg;AMT\u30b9\u30c8\u30ec\u30fc\u30b8\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;
1449 +var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+" / "+q):e+"\u30eb\u30fc\u30c8";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" \u30d0\u30a4\u30c8</i></div></div>");
1450 +d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\u30d5\u30a1\u30a4\u30eb\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002</i></div><br>");
1451 +v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u30b9\u30c8\u30ec\u30fc\u30b8\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093...<br/>"+AddButton("\u30ea\u30d5\u30ec\u30c3\u30b7\u30e5","PullStorage()"))}
1452 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\u30d9\u30f3\u30c0\u30fc",b));""!=c&&(e+=addHtmlValue("\u5fdc\u7528",c));e+=addHtmlValue("\u540d\u524d",a);e+=addHtmlValue("\u30b5\u30a4\u30ba",v.size+" bytes");v.link&&(e+=addHtmlValue("\u30ea\u30f3\u30af",v.link));setDialogMode(11,"\u30b9\u30c8\u30ec\u30fc\u30b8\u30a2\u30a4\u30c6\u30e0",5,showStorageDetailsEx,e,d)}}
1453 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
1454 function storageDeleteResponse(b,c){200!=c?messagebox("\u30b9\u30c8\u30ec\u30fc\u30b8",format("\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3067\u304d\u307e\u305b\u3093\uff08ERR {0}\uff09\u3002\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u96fb\u6e90\u304c\u30aa\u30f3\u306b\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002",c)):PullStorage()}
@@ -1459,7 +1464,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1464 b}
1465 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1466 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1462 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u65e5\u3005").replace("H"," \u6642\u9593").replace("M"," \u5206");b=b.replace(" 1\u65e5"," 1\u65e5").replace(" 1\u6642\u9593"," 1\u6642\u9593").replace(" 1\u5206"," 1\u5206");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1467 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u65e5\u3005").replace("H"," \u6642\u9593").replace("M"," \u5206");b=b.replace(" 1\u65e5"," 1\u65e5").replace(" 1\u6642\u9593"," 1\u6642\u9593").replace(" 1\u5206 "," 1\u5206 ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1468 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u3092\u7ba1\u7406\u3057\u307e\u3059\u3002<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u76ee\u899a\u3081\u308b "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u3067"),void 0!=d[c].Interval&&(a+=" \u305d\u3057\u3066\u305d\u308c\u305e\u308c"+
1469 _fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+="\u3001\u5b8c\u4e86\u3057\u305f\u3089\u524a\u9664"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u7de8\u96c6...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\u30a6\u30a7\u30a4\u30af\u30a2\u30e9\u30fc\u30e0\u306f\u767b\u9332\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002</i></div><br>";
1470 d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("\u3059\u3079\u3066\u306e\u30a2\u30e9\u30fc\u30e0\u3092\u524a\u9664","RemoveAllAlarms()")+AddButton("\u8ffd\u52a0","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-ko.htm
+625 -620
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="ko" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=잇다 onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>연결 해제</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>시스템 상태</a><p id=go14 class=nav1 onclick=go(14)><a>원격 데스크탑</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>파일</a><p id=go13 class=nav1 onclick=go(13)><a>시리얼 오버 LAN</a><p id=go2 class=nav1 onclick=go(2)><a>하드웨어 정보</a><p id=go6 class=nav1 onclick=go(6)><a>이벤트 로그</a><p id=go15 class=nav1 onclick=go(15)><a>감사 로그</a><p id=go21 class=nav1 onclick=go(21)><a>저장</a><p id=go8 class=nav1 onclick=go(8)><a>네트워크 설정</a><p id=go17 class=nav1 onclick=go(17)><a>인터넷 설정</a><p id=go16 class=nav1 onclick=go(16)><a>보안 설정</a><p id=go19 class=nav1 onclick=go(19)><a>에이전트 존재</a><p id=go18 class=nav1 onclick=go(18)><a>시스템 방어</a><p id=go11 class=nav1 onclick=go(11)><a>사용자 계정</a><p id=go22 class=nav1 onclick=go(22)><a>구독</a><p id=go23 class=nav1 onclick=go(23)><a>웨이크 경보</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN 브라우저</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="디스크 맵" onclick=iderToggleDiskMap()><input type=button value="IDE-R 세션 중지" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>플로피, 블록은 512 바이트입니다.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, 블록은 2048 바이트입니다.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>이 컴퓨터의 펌웨어는 업데이트되어야합니다.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>여기를 확인하십시오</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>불러오는 중 ...</h1></div><div id=p1 style=display:none><h1>시스템 상태</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>하드웨어 정보</h1><span id=16></span></div><div id=p6 style=display:none><h1>이벤트 로그</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>네트워크 설정</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>사용자 계정</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN 브라우저</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=질문 style=margin:4px onclick=wsmanQuery()><input type=button value=명확한 style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=필터 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN 터미널</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 Serial-over-LAN 기능이 비활성화되었습니다<span id=26>사용하려면 여기를 클릭하십시오.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="캡처 시작" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=잇다 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>연결이 끊어졌습니다.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="리턴 키가 보낼 것을 토글" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="터미널 크기 전환" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="인텔 (F10 = ESC + [OM)" title="F1 ~ F10 키 에뮬레이션 유형 전환" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="확장 된 아스키" title="터미널 에뮬레이션 유형 전환" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>역행 키이<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=풀 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>원격 데스크탑</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 KVM 기능이 비활성화되었습니다<span id=37>사용하려면 여기를 클릭하십시오.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="왼쪽으로 회전" onclick=drotate(-1)>↺</div><div class=rb title="오른쪽으로 회전" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="전체 화면 모드 전환" onkeypress="return false" onkeydown="return false" value=완전한 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="원격 데스크톱의 스크린 샷 저장" onkeypress="return false" onkeydown="return false" value=저장... onclick=deskSaveImage() style=margin-right:3px><input type=button value="설정 ..." title="원격 데스크톱 설정 편집" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="원격 시스템의 전원 상태 변경" onkeypress="return false" onkeydown="return false" value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=잇다 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>연결이 끊어졌습니다.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>승리<option value=1>승 + 다운<option value=2>승 +<option value=3>승 + L<option value=4>승 + M<option value=20>승 + R<option value=23>승 + 왼쪽<option value=24>승리 + 오른쪽<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=유형 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>빈 화면&nbsp;</span><span id=47><input id=48 type=checkbox>보기 만&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>감사 로그</h1><span id=50></span></div><div id=p16 style=display:none><h1>보안 설정</h1><span id=51></span></div><div id=p17 style=display:none><h1>인터넷 설정</h1><span id=52></span></div><div id=p18 style=display:none><h1>시스템 방어</h1><span id=53></span></div><div id=p19 style=display:none><h1>에이전트 존재</h1><span id=54></span></div><div id=p21 style=display:none><h1>저장</h1><span id=55></span></div><div id=p22 style=display:none><h1>이벤트 구독</h1><span id=56></span></div><div id=p23 style=display:none><h1>웨이크 경보</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>파일</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=쪽으로>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="모두 선택" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value="이름 바꾸기" onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=지우다 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="새 폴더" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=업로드 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=절단 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=부 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=풀 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value="새롭게 하다" onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">이름으로 분류하다<option value=2>크기별로 정렬<option value=3>날짜순으로 정렬<option value=4>이름으로 내림차순<option value=5>크기로 내림차순<option value=6>날짜별로 내림차순</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>사용자 이름</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>암호*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>비밀번호 확인</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>현지<option value=1>회로망<option value=2>어떤</select><div>허가</div></div><div>부여 된 권한</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* 대문자, 소문자, 0-9 및! @ # $ % ^ &amp; * () +-중 하나를 포함하는 최소 8 자</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>파워 액션</div></div><div><span style=color:red>경고:</span>일부 전원 작업으로 인해 데이터가 손실 될 수 있으며 데스크톱, 터미널 또는 디스크 리디렉션 세션의 연결이 끊어 질 수 있습니다.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>동의 코드</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>기본 디스플레이<option value=1>보조 디스플레이<option id=d6ThirdDisplay value=2 style=display:none>세번째 디스플레이</select><div>동의 표시</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>이미지 인코딩</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>로컬 마우스 커서 표시</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Del 표시</label><br><label><input type=checkbox id=d7limitFrameRate>프레임 속도 제한</label><br><label><input type=checkbox id=d7noMouseRotate>마우스를 돌리지 마십시오</label><br></div><div>다른 설정</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">소프트웨어 KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50 %<option value=40>40 %<option selected="selected" value=30>30 %<option value=20>20 %<option value=10>10 %<option value=5>5 %<option value=1>1%</select><div style=height:20px>품질</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100 %<option value=896>87.5 %<option value=768>75 %<option value=640>62.5 %<option value=512>50 %<option value=384>37.5 %<option value=256>25 %<option value=128>12.5 %</select><div style=height:20px>스케일링</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=관리자 style=float:right;width:220px><div style=height:20px>사용자 이름</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>암호</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>리디렉션 포트</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM 원격 데스크톱</label><label style=display:block><input type=checkbox id=c17>IDE 리디렉션<br></label><label style=display:block><input type=checkbox id=c18>시리얼 오버 LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>불필요<br></label><label><input type=radio name=d10 id=c20 value=1>KVM에만 필요<br></label><label><input type=radio name=d10 id=c21 value=4294967295>항상 필수<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">프로필 이름</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>우선 순위</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>입증</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>없음</select><div>암호화</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">암호*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">비밀번호 확인</div></div></div><div id=dialog19 style=margin:auto;margin:3px>이 시스템에 대한 인텔 ® AMT의 전체 상태가 파일로 저장됩니다. 비밀번호는 저장되지 않지만 일부 민감한 데이터가 포함될 수 있습니다.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>비활성화<br><input type=radio name=d20 id=d20b value=1>ICMP 응답<br><input type=radio name=d20 id=d20c value=2>RMCP 응답<br><input type=radio name=d20 id=d20d value=3>ICMP 및 RMCP 응답<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>운영 체제 IP 주소 동기화</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP 주소</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>서브넷 마크</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>게이트웨이</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>기본 DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>대체 DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>비활성화<option value=1>비활성화, DHCP 업데이트<option value=2>가능</select><div>동적 DNS 클라이언트</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>업데이트 간격 (분)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (초)</div></div><div style=font-size:10px><br>기본 간격은 1440 분이고 기본 TTL은 900 초입니다.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>파워 업<option value=10>초기화<option value=5>전원 사이클<option value=8>전력 다운<option id=d24p500 value=500>대기 모드에서 OS 웨이크<option id=d24p501 value=501>OS 절전<option value=999>부팅 옵션 설정</select><div>원격 명령</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS 일시 정지</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>보안 부팅 시행</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS 설정</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>강제 진행 이벤트</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>전원 잠금 버튼</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>잠금 재설정 버튼</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>잠자기 버튼</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>키보드 잠금</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS 비밀번호 우회</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS를 다시 플래시</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>안전 모드</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDER 사용</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>시리얼 오버 LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>인텔 ® 원격 보안 지우기</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>부팅 설정</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>없음<option id=ForceDVDBootOption value=1>CD / DVD 부팅 강제<option id=ForcePXEBootOption value=2>PXE 부팅 강제<option id=ForceHDBootOption value=3>강제 하드 디스크 부팅<option id=ForceDiagBootOption value=4>강제 진단 부팅</select><div>부팅 소스</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>없음<option value=1>색인 1<option value=2>인덱스 2<option value=3>색인 3<option value=3>색인 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>플로피로 부팅<option value=1>CDROM으로 부팅</select><div>IDER 부팅 장치</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>시스템 기본값<option id=c46 value=1>조용한<option id=c47 value=2>말 수가 많은<option id=c48 value=3>빈 화면</select><div>어휘</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE 비밀번호</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>알람 이름</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>웨이크 날짜 (년-월-일)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>웨이크 시간 (시 : 분 : 초)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>간격 (일-시간-분)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>알람 유지<option value=1>완료시 삭제</select></div><div style=padding-top:4px>깨어 난 후</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>가능<br></label><label><input type=radio name=d26b id=c50 value=0>비활성화<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>가능<br></label><label><input type=radio name=d26a id=c52 value=0>비활성화<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=취소 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=확인 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=지우다 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="ko" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=잇다 onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>연결 해제</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>시스템 상태</a><p id=go14 class=nav1 onclick=go(14)><a>원격 데스크탑</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>파일</a><p id=go13 class=nav1 onclick=go(13)><a>시리얼 오버 LAN</a><p id=go2 class=nav1 onclick=go(2)><a>하드웨어 정보</a><p id=go6 class=nav1 onclick=go(6)><a>이벤트 로그</a><p id=go15 class=nav1 onclick=go(15)><a>감사 로그</a><p id=go21 class=nav1 onclick=go(21)><a>저장</a><p id=go8 class=nav1 onclick=go(8)><a>네트워크 설정</a><p id=go17 class=nav1 onclick=go(17)><a>인터넷 설정</a><p id=go16 class=nav1 onclick=go(16)><a>보안 설정</a><p id=go19 class=nav1 onclick=go(19)><a>에이전트 존재</a><p id=go18 class=nav1 onclick=go(18)><a>시스템 방어</a><p id=go11 class=nav1 onclick=go(11)><a>사용자 계정</a><p id=go22 class=nav1 onclick=go(22)><a>구독</a><p id=go23 class=nav1 onclick=go(23)><a>웨이크 경보</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN 브라우저</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="디스크 맵" onclick=iderToggleDiskMap()><input type=button value="IDE-R 세션 중지" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>플로피, 블록은 512 바이트입니다.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, 블록은 2048 바이트입니다.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>이 컴퓨터의 펌웨어는 업데이트되어야합니다.&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>여기를 확인하십시오</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>불러오는 중 ...</h1></div><div id=p1 style=display:none><h1>시스템 상태</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>하드웨어 정보</h1><span id=16></span></div><div id=p6 style=display:none><h1>이벤트 로그</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>네트워크 설정</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>사용자 계정</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN 브라우저</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=질문 style=margin:4px onclick=wsmanQuery()><input type=button value=명확한 style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=필터 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN 터미널</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 Serial-over-LAN 기능이 비활성화되었습니다<span id=26>사용하려면 여기를 클릭하십시오.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="캡처 시작" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=잇다 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>연결이 끊어졌습니다.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="리턴 키가 보낼 것을 토글" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="터미널 크기 전환" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="인텔 (F10 = ESC + [OM)" title="F1 ~ F10 키 에뮬레이션 유형 전환" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="확장 된 아스키" title="터미널 에뮬레이션 유형 전환" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>역행 키이<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=풀 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>원격 데스크탑</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>인텔 ® AMT 리디렉션 포트 또는 KVM 기능이 비활성화되었습니다<span id=37>사용하려면 여기를 클릭하십시오.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>원격 컴퓨터의 전원이 켜져 있지 않으면 여기를 클릭하여 전원 명령을 실행하십시오.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="왼쪽으로 회전" onclick=drotate(-1)>↺</div><div class=rb title="오른쪽으로 회전" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="전체 화면 모드 전환" onkeypress="return false" onkeydown="return false" value=완전한 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="원격 데스크톱의 스크린 샷 저장" onkeypress="return false" onkeydown="return false" value=저장... onclick=deskSaveImage() style=margin-right:3px><input type=button value="설정 ..." title="원격 데스크톱 설정 편집" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="원격 디스크 마운트 작업 시작" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="원격 시스템의 전원 상태 변경" onkeypress="return false" onkeydown="return false" value="전원 동작 ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=잇다 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>연결이 끊어졌습니다.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>승리<option value=1>승 + 다운<option value=2>승 +<option value=3>승 + L<option value=4>승 + M<option value=20>승 + R<option value=23>승 + 왼쪽<option value=24>승리 + 오른쪽<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=보내다 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=유형 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>빈 화면&nbsp;</span><span id=47><input id=48 type=checkbox>보기 만&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>감사 로그</h1><span id=50></span></div><div id=p16 style=display:none><h1>보안 설정</h1><span id=51></span></div><div id=p17 style=display:none><h1>인터넷 설정</h1><span id=52></span></div><div id=p18 style=display:none><h1>시스템 방어</h1><span id=53></span></div><div id=p19 style=display:none><h1>에이전트 존재</h1><span id=54></span></div><div id=p21 style=display:none><h1>저장</h1><span id=55></span></div><div id=p22 style=display:none><h1>이벤트 구독</h1><span id=56></span></div><div id=p23 style=display:none><h1>웨이크 경보</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>파일</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=쪽으로>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="모두 선택" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value="이름 바꾸기" onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=지우다 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="새 폴더" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=업로드 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=절단 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=부 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=풀 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value="새롭게 하다" onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">이름으로 분류하다<option value=2>크기별로 정렬<option value=3>날짜순으로 정렬<option value=4>이름으로 내림차순<option value=5>크기로 내림차순<option value=6>날짜별로 내림차순</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>사용자 이름</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>암호*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>비밀번호 확인</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>현지<option value=1>회로망<option value=2>어떤</select><div>허가</div></div><div>부여 된 권한</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* 대문자, 소문자, 0-9 및! @ # $ % ^ &amp; * () +-중 하나를 포함하는 최소 8 자</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>파워 액션</div></div><div><span style=color:red>경고:</span>일부 전원 작업으로 인해 데이터가 손실 될 수 있으며 데스크톱, 터미널 또는 디스크 리디렉션 세션의 연결이 끊어 질 수 있습니다.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>동의 코드</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>기본 디스플레이<option value=1>보조 디스플레이<option id=d6ThirdDisplay value=2 style=display:none>세번째 디스플레이</select><div>동의 표시</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>이미지 인코딩</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>비활성화<option value=2>Automatic<option value=3>가능</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>로컬 마우스 커서 표시</label><br><label><input type=checkbox id=d7showcad>Ctrl-Alt-Del 표시</label><br><label><input type=checkbox id=d7limitFrameRate>프레임 속도 제한</label><br><label><input type=checkbox id=d7noMouseRotate>마우스를 돌리지 마십시오</label><br></div><div>다른 설정</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">소프트웨어 KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50 %<option value=40>40 %<option selected="selected" value=30>30 %<option value=20>20 %<option value=10>10 %<option value=5>5 %<option value=1>1%</select><div style=height:20px>품질</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100 %<option value=896>87.5 %<option value=768>75 %<option value=640>62.5 %<option value=512>50 %<option value=384>37.5 %<option value=256>25 %<option value=128>12.5 %</select><div style=height:20px>스케일링</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=관리자 style=float:right;width:220px><div style=height:20px>사용자 이름</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>암호</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>리디렉션 포트</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM 원격 데스크톱</label><label style=display:block><input type=checkbox id=c17>IDE 리디렉션<br></label><label style=display:block><input type=checkbox id=c18>시리얼 오버 LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>불필요<br></label><label><input type=radio name=d10 id=c20 value=1>KVM에만 필요<br></label><label><input type=radio name=d10 id=c21 value=4294967295>항상 필수<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">프로필 이름</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="최대 32 자"><div title="최대 32 자">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>우선 순위</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>입증</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>없음</select><div>암호화</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">암호*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="8 자에서 63 자 사이의 길이"><div title="8 자에서 63 자 사이의 길이">비밀번호 확인</div></div></div><div id=dialog19 style=margin:auto;margin:3px>이 시스템에 대한 인텔 ® AMT의 전체 상태가 파일로 저장됩니다. 비밀번호는 저장되지 않지만 일부 민감한 데이터가 포함될 수 있습니다.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>비활성화<br><input type=radio name=d20 id=d20b value=1>ICMP 응답<br><input type=radio name=d20 id=d20c value=2>RMCP 응답<br><input type=radio name=d20 id=d20d value=3>ICMP 및 RMCP 응답<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>운영 체제 IP 주소 동기화</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP 주소</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>서브넷 마크</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>게이트웨이</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>기본 DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>대체 DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>비활성화<option value=1>비활성화, DHCP 업데이트<option value=2>가능</select><div>동적 DNS 클라이언트</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>업데이트 간격 (분)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (초)</div></div><div style=font-size:10px><br>기본 간격은 1440 분이고 기본 TTL은 900 초입니다.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>파워 업<option value=10>초기화<option value=5>전원 사이클<option value=8>전력 다운<option id=d24p500 value=500>대기 모드에서 OS 웨이크<option id=d24p501 value=501>OS 절전<option value=999>부팅 옵션 설정</select><div>원격 명령</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS 일시 정지</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>보안 부팅 시행</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS 설정</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>강제 진행 이벤트</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>전원 잠금 버튼</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>잠금 재설정 버튼</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>잠자기 버튼</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>키보드 잠금</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS 비밀번호 우회</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS를 다시 플래시</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>안전 모드</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>IDER 사용</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>시리얼 오버 LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>인텔 ® 원격 보안 지우기</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>부팅 설정</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>없음<option id=ForceDVDBootOption value=1>CD / DVD 부팅 강제<option id=ForcePXEBootOption value=2>PXE 부팅 강제<option id=ForceHDBootOption value=3>강제 하드 디스크 부팅<option id=ForceDiagBootOption value=4>강제 진단 부팅</select><div>부팅 소스</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>없음<option value=1>색인 1<option value=2>인덱스 2<option value=3>색인 3<option value=3>색인 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>플로피로 부팅<option value=1>CDROM으로 부팅</select><div>IDER 부팅 장치</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>시스템 기본값<option id=c46 value=1>조용한<option id=c47 value=2>말 수가 많은<option id=c48 value=3>빈 화면</select><div>어휘</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE 비밀번호</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>알람 이름</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>웨이크 날짜 (년-월-일)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>웨이크 시간 (시 : 분 : 초)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>간격 (일-시간-분)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>알람 유지<option value=1>완료시 삭제</select></div><div style=padding-top:4px>깨어 난 후</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>가능<br></label><label><input type=radio name=d26b id=c50 value=0>비활성화<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>가능<br></label><label><input type=radio name=d26a id=c52 value=0>비활성화<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=취소 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=확인 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=지우다 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,181 +12,182 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \ub370\uc774\ud130";if(0==b)return E[c[1]];
91 -if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \ub370\uc774\ud130";if(0==b)return D[c[1]];
91 +if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",
92 c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";
93 -if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\uc6cc\uce58 \ub3c5 \uc694\uc6d0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \ub85c \ubcc0\uacbd"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\ucf00\uc774\uc2a4 \uce68\uc785";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\uc6d0\uaca9 LAN\uc744 \ud1b5\ud55c \uc9c1\ub82c \uc5f0\uacb0 \uc138\uc158\uc774 \uc124\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";
93 +if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\uc6cc\uce58 \ub3c5 \uc694\uc6d0"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \ub85c \ubcc0\uacbd"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\ucf00\uc774\uc2a4 \uce68\uc785";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\uc6d0\uaca9 LAN\uc744 \ud1b5\ud55c \uc9c1\ub82c \uc5f0\uacb0 \uc138\uc158\uc774 \uc124\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";
94 if(1==c[2])return"LAN\uc744 \ud1b5\ud55c \uc6d0\uaca9 \uc9c1\ub82c \uc138\uc158\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \ucee8\ud2b8\ub864\uc774 \ubcf5\uc6d0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";if(2==c[2])return"\uc6d0\uaca9 IDE \ub9ac\ub514\ub809\uc158 \uc138\uc158\uc774 \uc124\uc815\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";if(3==c[2])return"\uc6d0\uaca9 IDE \ub9ac\ub514\ub809\uc158 \uc138\uc158\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \ucee8\ud2b8\ub864\uc774 \ubcf5\uc6d0\ub418\uc5c8\uc2b5\ub2c8\ub2e4."}if(36==
95 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="\uc5f4\uad11\ud55c"),4294967293==a?"\ubaa8\ub4e0 \uc218\uc2e0 \ud328\ud0b7 \ud544\ud130\uac00 \uc77c\uce58\ud588\uc2b5\ub2c8\ub2e4."+b+" \uc0c1\ud638 \uc791\uc6a9.":4294967292==a?"\ubaa8\ub4e0 \ubc1c\uc2e0 \ud328\ud0b7 \ud544\ud130\uac00 \uc77c\uce58\ud588\uc2b5\ub2c8\ub2e4."+b+" \uc0c1\ud638 \uc791\uc6a9.":4294967290==a?"\uc2a4\ud478\ud551 \ub41c \ud328\ud0b7 \ud544\ud130\uac00 \uc77c\uce58\ud588\uc2b5\ub2c8\ub2e4."+b+" \uc0c1\ud638 \uc791\uc6a9.":
96 "\ud544\ud130"+a+" \uc5d0 \uc77c\uce58\ud588\ub2e4"+b+" \uc0c1\ud638 \uc791\uc6a9.";if(192==a)return 0==c[2]?"\ubcf4\uc548 \uc815\ucc45\uc774 \ud638\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc77c\ubd80 \ub610\ub294 \ubaa8\ub4e0 \ub124\ud2b8\uc6cc\ud06c \ud2b8\ub798\ud53d (TX)\uc774 \uc911\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.":2==c[2]?"\ubcf4\uc548 \uc815\ucc45\uc774 \ud638\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc77c\ubd80 \ub610\ub294 \ubaa8\ub4e0 \ub124\ud2b8\uc6cc\ud06c \ud2b8\ub798\ud53d (RX)\uc774 \uc911\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4.":
97 "\ubcf4\uc548 \uc815\ucc45\uc774 \ud638\ucd9c\ub418\uc5c8\uc2b5\ub2c8\ub2e4.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"\uc6d0\uaca9 \uc5f0\uacb0\uc5d0 \ub300\ud55c \uc0ac\uc6a9\uc790 \uc694\uccad.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC \uc624\ub958 : Intel AMT\uc758 NAC\uac00 \ube44\ud65c\uc131\ud654\ub418\uc5b4\uc788\ub294 \ub3d9\uc548 \uc790\uc138\ub97c \uc5bb\uc73c\uc2ed\uc2dc\uc624.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA \uc624\ub958 : \uc77c\ubc18 \uc624\ub958"}return 6==
98 a?"\uc778\uc99d \uc2e4\ud328"+(c[1]+(c[2]<<8))+" \ud0c0\uc784\uc2a4. \uc2dc\uc2a4\ud15c\uc774 \uacf5\uaca9\uc744 \ubc1b\uace0\uc788\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.":30==a?"\ubd80\ud305 \uac00\ub2a5\ud55c \ubbf8\ub514\uc5b4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4":32==a?"\uc6b4\uc601 \uccb4\uc81c \uc7a0\uae08 \ub610\ub294 \uc804\uc6d0 \uc911\ub2e8":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"\uc2dc\uc2a4\ud15c \ubd80\ud305 \uc2e4\ud328":37==a?"\uc2dc\uc2a4\ud15c \ud38c\uc6e8\uc5b4\uac00 \uc2dc\uc791\ub418\uc5c8\uc2b5\ub2c8\ub2e4 (\uc801\uc5b4\ub3c4 \ud558\ub098 \uc774\uc0c1\uc758 CPU\uac00 \uc62c\ubc14\ub974\uac8c \uc2e4\ud589 \uc911\uc784).":
99 -"\uc54c \uc218\uc5c6\ub294 \uc13c\uc11c \uc720\ud615 #"+a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||
100 -(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>\ud604\uc9c0</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \uae30\ubcf8 \ud3ec\ud2b8</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=
101 -a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=
102 -1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),
103 -function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),
104 -z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=
105 -b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+
106 -a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
107 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
108 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
109 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
110 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
111 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
112 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
113 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
114 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
115 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
116 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
117 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
118 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
119 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
120 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
121 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
122 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
123 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
124 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
125 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
126 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
127 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
128 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
129 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
130 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
131 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
132 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
133 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
134 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
135 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
136 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
137 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
138 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
139 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
140 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
141 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
142 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
143 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
144 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
145 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
146 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
147 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
148 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
149 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
150 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
151 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
152 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
153 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
99 +"\uc54c \uc218\uc5c6\ub294 \uc13c\uc11c \uc720\ud615 #"+a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||
100 +(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\ud604\uc9c0</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \uae30\ubcf8 \ud3ec\ud2b8</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=
101 +a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=
102 +1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),
103 +function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),
104 +z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=
105 +b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+
106 +a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
107 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
108 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
109 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
110 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
111 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
112 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
113 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
114 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
115 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
116 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
117 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
118 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
119 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
120 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
121 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
122 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
123 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
124 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
125 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
126 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
127 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
128 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
129 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
130 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
131 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
132 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
133 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
134 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
135 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
136 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
137 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
138 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
139 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
140 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
141 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
142 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
143 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
144 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
145 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
146 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
147 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
148 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
149 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
150 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
151 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
152 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
153 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
154 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
155 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
156 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
157 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
158 -[a,b,[]])};var E="\uc9c0\uc815\ub418\uc9c0 \uc54a\uc74c. ; \uc2dc\uc2a4\ud15c\uc5d0 \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00 \uc2e4\uc81c\ub85c \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \uc0ac\uc6a9 \uac00\ub2a5\ud55c \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00\uc5c6\uace0 \uc124\uce58\ub41c \ubaa8\ub4e0 \uba54\ubaa8\ub9ac\uc5d0 \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c / ATAPI / IDE \uc7a5\uce58 \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ub514\uc2a4\ucf13 \ud558\uc704 \uc2dc\uc2a4\ud15c \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 PS / 2 \ub610\ub294 USB \ud0a4\ubcf4\ub4dc \uc624\ub958. ; \uc774\ub3d9\uc2dd \ubd80\ud305 \ubbf8\ub514\uc5b4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ube44\ub514\uc624 \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ube44\ub514\uc624 \uc7a5\uce58\uac00 \uac10\uc9c0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \ud38c\uc6e8\uc5b4 (BIOS) ROM \uc190\uc0c1\uc774 \uac10\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4. ; CPU \uc804\uc555 \ubd88\uc77c\uce58 (\ub3d9\uc77c\ud55c \uc804\uc6d0\uc744 \uacf5\uc720\ud558\ub294 \ud504\ub85c\uc138\uc11c\uc758 \uc804\uc555 \uc694\uad6c \uc0ac\ud56d\uc774 \uc77c\uce58\ud558\uc9c0 \uc54a\uc74c) ; CPU \uc18d\ub3c4 \uc77c\uce58 \uc2e4\ud328".split(";"),
159 -m="\uc9c0\uc815\ub418\uc9c0 \uc54a\uc74c. ; \uba54\ubaa8\ub9ac \ucd08\uae30\ud654. ; \ud558\ub4dc \ub514\uc2a4\ud06c \ucd08\uae30\ud654 \ubc0f \ud14c\uc2a4\ud2b8 \uc2dc\uc791 ; \ubcf4\uc870 \ud504\ub85c\uc138\uc11c \ucd08\uae30\ud654 ; \uc0ac\uc6a9\uc790 \uc778\uc99d ; \uc0ac\uc6a9\uc790 \uc2dc\uc791 \uc2dc\uc2a4\ud15c \uc124\uc815 ; USB \ub9ac\uc18c\uc2a4 \uad6c\uc131 ; PCI \ub9ac\uc18c\uc2a4 \uad6c\uc131 ; \uc635\uc158 ROM \ucd08\uae30\ud654 ; \ube44\ub514\uc624 \ucd08\uae30\ud654 ; \uce90\uc2dc \ucd08\uae30\ud654 ; SM \ubc84\uc2a4 \ucd08\uae30\ud654 ; \ud0a4\ubcf4\ub4dc \ucee8\ud2b8\ub864\ub7ec \ucd08\uae30\ud654 ; \ub0b4\uc7a5 \ucee8\ud2b8\ub864\ub7ec / \uad00\ub9ac \ucee8\ud2b8\ub864\ub7ec \ucd08\uae30\ud654 ; \ub3c4\ud0b9 \uc2a4\ud14c\uc774\uc158 \uc5f0\uacb0 ; \ub3c4\ud0b9 \uc2a4\ud14c\uc774\uc158 \ud65c\uc131\ud654 ; \ub3c4\ud0b9 \uc2a4\ud14c\uc774\uc158 \uaebc\ub0b4\uae30 ; \ub3c4\ud0b9 \uc2a4\ud14c\uc774\uc158 \ube44\ud65c\uc131\ud654 ; \uc6b4\uc601 \uccb4\uc81c \uae68\uc6b0\uae30 \ubca1\ud130 ; \uc6b4\uc601 \uccb4\uc81c \ubd80\ud305 \ud504\ub85c\uc138\uc2a4 \uc2dc\uc791 ; \ubcf4\ub4dc \ub610\ub294 \ub9c8\ub354 \ubcf4\ub4dc \ucd08\uae30\ud654 ; \uc608\uc57d ; \ud50c\ub85c\ud53c \ucd08\uae30\ud654 ; \ud0a4\ubcf4\ub4dc \ud14c\uc2a4\ud2b8 ; \ud3ec\uc778\ud305 \uc7a5\uce58 \ud14c\uc2a4\ud2b8 ; 1 \ucc28 \ud504\ub85c\uc138\uc11c \ucd08\uae30\ud654".split(";"),
157 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
158 +[a,b,[]])};var D="\uc9c0\uc815\ub418\uc9c0 \uc54a\uc74c. ; \uc2dc\uc2a4\ud15c\uc5d0 \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00 \uc2e4\uc81c\ub85c \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \uc0ac\uc6a9 \uac00\ub2a5\ud55c \uc2dc\uc2a4\ud15c \uba54\ubaa8\ub9ac\uac00\uc5c6\uace0 \uc124\uce58\ub41c \ubaa8\ub4e0 \uba54\ubaa8\ub9ac\uc5d0 \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c / ATAPI / IDE \uc7a5\uce58 \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ub514\uc2a4\ucf13 \ud558\uc704 \uc2dc\uc2a4\ud15c \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ud558\ub4dc \ub514\uc2a4\ud06c \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 PS / 2 \ub610\ub294 USB \ud0a4\ubcf4\ub4dc \uc624\ub958. ; \uc774\ub3d9\uc2dd \ubd80\ud305 \ubbf8\ub514\uc5b4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. ; \ubcf5\uad6c \ud560 \uc218\uc5c6\ub294 \ube44\ub514\uc624 \ucee8\ud2b8\ub864\ub7ec \uc624\ub958. ; \ube44\ub514\uc624 \uc7a5\uce58\uac00 \uac10\uc9c0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. ; \ud38c\uc6e8\uc5b4 (BIOS) ROM \uc190\uc0c1\uc774 \uac10\uc9c0\ub418\uc5c8\uc2b5\ub2c8\ub2e4. ; CPU \uc804\uc555 \ubd88\uc77c\uce58 (\ub3d9\uc77c\ud55c \uc804\uc6d0\uc744 \uacf5\uc720\ud558\ub294 \ud504\ub85c\uc138\uc11c\uc758 \uc804\uc555 \uc694\uad6c \uc0ac\ud56d\uc774 \uc77c\uce58\ud558\uc9c0 \uc54a\uc74c) ; CPU \uc18d\ub3c4 \uc77c\uce58 \uc2e4\ud328".split(";"),
159 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
160 k="\uc9c0\uc815\ub418\uc9c0 \uc54a\uc74c ; \uae30\ud0c0 ; \uc54c \uc218 \uc5c6\uc74c ; \ud504\ub85c\uc138\uc11c ; \ub514\uc2a4\ud06c ; \uc8fc\ubcc0 \uc7a5\uce58 ; \uc2dc\uc2a4\ud15c \uad00\ub9ac \ubaa8\ub4c8 ; \uc2dc\uc2a4\ud15c \ubcf4\ub4dc ; \uba54\ubaa8\ub9ac \ubaa8\ub4c8 ; \ud504\ub85c\uc138\uc11c \ubaa8\ub4c8 ; \uc804\uc6d0 \uacf5\uae09 \uc7a5\uce58 ; \uce74\ub4dc\uc5d0 \ucd94\uac00 ; \uc804\uba74 \ud328\ub110 \ubcf4\ub4dc ; \ud6c4\uba74 \ud328\ub110 \ubcf4\ub4dc ; \uc804\uc6d0 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc ; \ub4dc\ub77c\uc774\ube0c \ud6c4\uba74 \ud310 ; \uc2dc\uc2a4\ud15c \ub0b4\ubd80 \ud655\uc7a5 \ubcf4\ub4dc ; \ub2e4\ub978 \uc2dc\uc2a4\ud15c \ubcf4\ub4dc ; \ud504\ub85c\uc138\uc11c \ubcf4\ub4dc ; \uc804\uc6d0 \uc7a5\uce58 ; \uc804\uc6d0 \ubaa8\ub4c8 ; \uc804\uc6d0 \uad00\ub9ac \ubcf4\ub4dc ; \uc100\uc2dc \ud6c4\uba74 \ud328\ub110 \ubcf4\ub4dc ; \uc2dc\uc2a4\ud15c \uc100\uc2dc ; \uc11c\ube0c \uc100\uc2dc ; \uae30\ud0c0 \uc100\uc2dc \ubcf4\ub4dc ; \ub514\uc2a4\ud06c \ub4dc\ub77c\uc774\ube0c \ubca0\uc774 ; \uc8fc\ubcc0 \ubca0\uc774 ; \ub514\ubc14\uc774\uc2a4 \ubca0\uc774 ; \ud32c \ub0c9\uac01 ; \ub0c9\uac01 \uc7a5\uce58 ; \ucf00\uc774\ube14 \uc778\ud130\ucee4\ub125\ud2b8 ; \uba54\ubaa8\ub9ac \uc7a5\uce58 ; \uc2dc\uc2a4\ud15c \uad00\ub9ac \uc18c\ud504\ud2b8\uc6e8\uc5b4 ; BIOS ; \uc778\ud154 (r) ME ; \uc2dc\uc2a4\ud15c \ubc84\uc2a4 ; \uadf8\ub8f9 ; \uc778\ud154 (r) ME ; \uc678\ubd80 \ud658\uacbd ; \ubc30\ud130\ub9ac ; \ud504\ub85c\uc138\uc2f1 \ube14\ub808\uc774\ub4dc ; \uc5f0\uacb0 \uc2a4\uc704\uce58 ; \ud504\ub85c\uc138\uc11c / \uba54\ubaa8\ub9ac \ubaa8\ub4c8 ; I / O \ubaa8\ub4c8 ; \ud504\ub85c\uc138\uc11c I / O \ubaa8\ub4c8 ; \uad00\ub9ac \ucee8\ud2b8\ub864\ub7ec \ud38c\uc6e8\uc5b4 ; IPMI \ucc44\ub110 ; PCI \ubc84\uc2a4 ; PCI \uace0\uc18d \ubc84\uc2a4 ; SCSI \ubc84\uc2a4 ; SATA / SAS \ubc84\uc2a4 ; \ud504\ub85c\uc138\uc11c \uc804\uba74 \ubc84\uc2a4".split(";");
161 -h.RealmNames=";; \ub9ac\ub514\ub809\uc158 ;; \ud558\ub4dc\uc6e8\uc5b4 \uc790\uc0b0 ; \uc6d0\uaca9 \uc81c\uc5b4 ; \uc2a4\ud1a0\ub9ac\uc9c0 ; \uc774\ubca4\ud2b8 \uad00\ub9ac\uc790 ; \uc2a4\ud1a0\ub9ac\uc9c0 \uad00\ub9ac\uc790 ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \ub85c\uceec ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \uc6d0\uaca9 ; \ud68c\ub85c \ucc28\ub2e8\uae30 ; \ub124\ud2b8\uc6cc\ud06c \uc2dc\uac04 ; \uc77c\ubc18 \uc815\ubcf4 ; \ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 ; EIT ; LocalUN ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 \uad00\ub9ac\uc790 ; \uc774\ubca4\ud2b8 \ub85c\uadf8 \ub9ac\ub354 ; \uac10\uc0ac \ub85c\uadf8 ; ACL \uc601\uc5ed ;;; \ub85c\uceec \uc2dc\uc2a4\ud15c".split(";");
162 -h.WatchdogCurrentStates={1:"\uc2dc\uc791\ub418\uc9c0 \uc54a\uc74c",2:"\uc911\uc9c0",4:"\ub2ec\ub9ac\ub294",8:"\ub9cc\ub8cc",16:"\ub9e4\ub2ec\ub9b0"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
163 -O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"\ubcf4\uc548 \uad00\ub9ac\uc790",17:"RCO",18:"\ub9ac\ub514\ub809\uc158 \uad00\ub9ac\uc790",19:"\ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 \uad00\ub9ac\uc790",20:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8",21:"\ub124\ud2b8\uc6cc\ud06c \uc2dc\uac04",22:"\ub124\ud2b8\uc6cc\ud06c \uad00\ub9ac",23:"\uc2a4\ud1a0\ub9ac\uc9c0 \uad00\ub9ac",24:"\uc774\ubca4\ud2b8 \uad00\ub9ac\uc790",25:"\ud68c\ub85c \ucc28\ub2e8\uae30 \uad00\ub9ac\uc790",26:"\uc0c1\ub2f4\uc6d0 \ud604\uc7ac \uc0c1\ud0dc \uad00\ub9ac\uc790",
161 +g.RealmNames=";; \ub9ac\ub514\ub809\uc158 ;; \ud558\ub4dc\uc6e8\uc5b4 \uc790\uc0b0 ; \uc6d0\uaca9 \uc81c\uc5b4 ; \uc2a4\ud1a0\ub9ac\uc9c0 ; \uc774\ubca4\ud2b8 \uad00\ub9ac\uc790 ; \uc2a4\ud1a0\ub9ac\uc9c0 \uad00\ub9ac\uc790 ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \ub85c\uceec ; \uc5d0\uc774\uc804\ud2b8 \ud504\ub808\uc98c\uc2a4 \uc6d0\uaca9 ; \ud68c\ub85c \ucc28\ub2e8\uae30 ; \ub124\ud2b8\uc6cc\ud06c \uc2dc\uac04 ; \uc77c\ubc18 \uc815\ubcf4 ; \ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 ; EIT ; LocalUN ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 ; \uc5d4\ub4dc \ud3ec\uc778\ud2b8 \uc561\uc138\uc2a4 \uc81c\uc5b4 \uad00\ub9ac\uc790 ; \uc774\ubca4\ud2b8 \ub85c\uadf8 \ub9ac\ub354 ; \uac10\uc0ac \ub85c\uadf8 ; ACL \uc601\uc5ed ;;; \ub85c\uceec \uc2dc\uc2a4\ud15c".split(";");
162 +g.WatchdogCurrentStates={1:"\uc2dc\uc791\ub418\uc9c0 \uc54a\uc74c",2:"\uc911\uc9c0",4:"\ub2ec\ub9ac\ub294",8:"\ub9cc\ub8cc",16:"\ub9e4\ub2ec\ub9b0"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
163 +O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"\ubcf4\uc548 \uad00\ub9ac\uc790",17:"RCO",18:"\ub9ac\ub514\ub809\uc158 \uad00\ub9ac\uc790",19:"\ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 \uad00\ub9ac\uc790",20:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8",21:"\ub124\ud2b8\uc6cc\ud06c \uc2dc\uac04",22:"\ub124\ud2b8\uc6cc\ud06c \uad00\ub9ac",23:"\uc2a4\ud1a0\ub9ac\uc9c0 \uad00\ub9ac",24:"\uc774\ubca4\ud2b8 \uad00\ub9ac\uc790",25:"\ud68c\ub85c \ucc28\ub2e8\uae30 \uad00\ub9ac\uc790",26:"\uc0c1\ub2f4\uc6d0 \ud604\uc7ac \uc0c1\ud0dc \uad00\ub9ac\uc790",
164 27:"\ubb34\uc120 \uad6c\uc131",28:"EAC",29:"KVM",30:"\uc0ac\uc6a9\uc790 \uc635\ud2b8 \uc778 \uc774\ubca4\ud2b8",32:"\uc2a4\ud06c\ub9b0 \ube14\ub7ad\ud0b9",33:"\uc6cc\uce58 \ub3c5 \uc774\ubca4\ud2b8",1600:"\ud504\ub85c\ube44\uc800\ub2dd \uc2dc\uc791",1601:"\ud504\ub85c\ube44\uc800\ub2dd \uc644\ub8cc",1602:"ACL \ud56d\ubaa9 \ucd94\uac00",1603:"ACL \ud56d\ubaa9 \uc218\uc815",1604:"ACL \ud56d\ubaa9 \uc81c\uac70",1605:"\uc2e0\uc784 \uc815\ubcf4\uac00 \uc62c\ubc14\ub974\uc9c0 \uc54a\uc740 ACL \uc561\uc138\uc2a4",
165 1606:"ACL \ud56d\ubaa9 \uc0c1\ud0dc",1607:"TLS \uc0c1\ud0dc \ubcc0\uacbd",1608:"TLS \uc11c\ubc84 \uc778\uc99d\uc11c \uc138\ud2b8",1609:"TLS \uc11c\ubc84 \uc778\uc99d\uc11c \uc81c\uac70",1610:"TLS \uc2e0\ub8b0\ud560 \uc218\uc788\ub294 \ub8e8\ud2b8 \uc778\uc99d\uc11c \ucd94\uac00",1611:"TLS \uc2e0\ub8b0\ud560 \uc218\uc788\ub294 \ub8e8\ud2b8 \uc778\uc99d\uc11c \uc81c\uac70",1612:"TLS \uc0ac\uc804 \uacf5\uc720 \ud0a4 \uc138\ud2b8",1613:"Kerberos \uc124\uc815 \uc218\uc815",1614:"Kerberos \uae30\ubcf8 \ud0a4 \uc218\uc815",
166 1615:"\ud50c\ub798\uc2dc \ub9c8\ubaa8 \uce74\uc6b4\ud130 \ub9ac\uc14b",1616:"\ud30c\uc6cc \ud328\ud0a4\uc9c0 \uc218\uc815",1617:"\uc601\uc5ed \uc778\uc99d \ubaa8\ub4dc \uc124\uc815",1618:"\ud074\ub77c\uc774\uc5b8\ud2b8\ub97c \uad00\ub9ac\uc790 \uc81c\uc5b4 \ubaa8\ub4dc\ub85c \uc5c5\uadf8\ub808\uc774\ub4dc",1619:"\ud504\ub85c\ube44\uc800\ub2dd \ud574\uc81c \uc2dc\uc791",1700:"\uc218\ud589 \ub41c \uc804\uc6d0 \ucf1c\uae30",1701:"\uc218\ud589 \ub41c \uc804\uc6d0 \ucc28\ub2e8",1702:"\uc218\ud589 \ub41c \uc804\uc6d0\uc8fc\uae30",
167 -1703:"\ub9ac\uc14b \uc218\ud589",1704:"\ubd80\ud305 \uc635\uc158 \uc124\uc815",1800:"IDER \uc138\uc158 \uac1c\uc124",1801:"IDER \uc138\uc158 \uc885\ub8cc",1802:"IDER \uc0ac\uc6a9",1803:"IDER \ube44\ud65c\uc131\ud654",1804:"SoL \uc138\uc158 \uac1c\uc124",1805:"SoL \uc138\uc158 \ub9c8\uac10",1806:"SoL \uc0ac\uc6a9",1807:"SoL \ube44\ud65c\uc131\ud654",1808:"KVM \uc138\uc158 \uc2dc\uc791",1809:"KVM \uc138\uc158 \uc885\ub8cc",1810:"KVM \uc0ac\uc6a9",1811:"KVM \ube44\ud65c\uc131\ud654",1812:"VNC \uc554\ud638\uac00 3 \ubc88 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4",
168 -1900:"\ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8",1901:"\ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 \uc2e4\ud328",2E3:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8\uac00 \uc9c0\uc6cc\uc9d0",2001:"\ubcf4\uc548 \uac10\uc0ac \uc815\ucc45 \uc218\uc815",2002:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \ube44\ud65c\uc131\ud654",2003:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \uc0ac\uc6a9",2004:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \ub0b4\ubcf4\ub0b4\uae30",2005:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \ubcf5\uad6c",
169 -2100:"\uc778\ud154 &reg; ME \uc2dc\uac04 \uc124\uc815",2200:"TCPIP \ub9e4\uac1c \ubcc0\uc218 \uc138\ud2b8",2201:"\ud638\uc2a4\ud2b8 \uc774\ub984 \uc138\ud2b8",2202:"\ub3c4\uba54\uc778 \uc774\ub984 \uc138\ud2b8",2203:"VLAN \ub9e4\uac1c \ubcc0\uc218 \uc138\ud2b8",2204:"\ub9c1\ud06c \uc815\ucc45 \uc138\ud2b8",2205:"IPv6 \ub9e4\uac1c \ubcc0\uc218 \uc138\ud2b8",2300:"\uae00\ub85c\ubc8c \uc2a4\ud1a0\ub9ac\uc9c0 \uc18d\uc131 \uc138\ud2b8",2301:"\uc2a4\ud1a0\ub9ac\uc9c0 EACL \uc218\uc815",2302:"\uc2a4\ud1a0\ub9ac\uc9c0 FPACL \uc218\uc815",
170 -2303:"\uc2a4\ud1a0\ub9ac\uc9c0 \uc4f0\uae30 \uc791\uc5c5",2400:"\uc54c\ub9bc \uad6c\ub3c5",2401:"\uc218\uc2e0 \uac70\ubd80 \uc54c\ub9bc",2402:"\uc774\ubca4\ud2b8 \ub85c\uadf8\uac00 \uc9c0\uc6cc\uc9d0",2403:"\uc774\ubca4\ud2b8 \ub85c\uadf8 \uace0\uc815",2500:"CB \ud544\ud130 \ucd94\uac00",2501:"CB \ud544\ud130 \uc81c\uac70",2502:"CB \uc815\ucc45 \ucd94\uac00",2503:"CB \uc815\ucc45 \uc81c\uac70",2504:"CB \uae30\ubcf8 \uc815\ucc45 \uc138\ud2b8",2505:"CB \ud734\ub9ac\uc2a4\ud2f1 \uc635\uc158 \uc138\ud2b8",
171 -2506:"CB \ud734\ub9ac\uc2a4\ud2f1 \uc0c1\ud0dc \uc9c0\uc6b0\uae30",2600:"\uc5d0\uc774\uc804\ud2b8 \uac10\uc2dc\uc790 \ucd94\uac00",2601:"\uc5d0\uc774\uc804\ud2b8 \uac10\uc2dc\uc790 \uc81c\uac70",2602:"\uc5d0\uc774\uc804\ud2b8 \uc6cc\uce58 \ub3c5 \uc870\uce58 \uc138\ud2b8",2700:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \ucd94\uac00",2701:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \uc81c\uac70",2702:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \uc5c5\ub370\uc774\ud2b8",2800:"EAC \uc790\uc138 \uc11c\uba85\uc790 SET",
172 -2801:"EAC \ud65c\uc131\ud654",2802:"EAC \ube44\ud65c\uc131\ud654",2803:"EAC \uc790\uc138 \uc0c1\ud0dc",2804:"EAC \uc124\uc815 \uc635\uc158",2900:"KVM \uc635\ud2b8 \uc778 \ud65c\uc131\ud654",2901:"KVM \uc635\ud2b8 \uc778 \ube44\ud65c\uc131\ud654",2902:"KVM \ube44\ubc00\ubc88\ud638 \ubcc0\uacbd",2903:"KVM \ub3d9\uc758 \uc131\uacf5",2904:"KVM \ub3d9\uc758 \uc2e4\ud328",3E3:"\uc635\ud2b8 \uc778 \uc815\ucc45 \ubcc0\uacbd",3001:"\ub3d9\uc758 \ucf54\ub4dc \uc774\ubca4\ud2b8 \ubcf4\ub0b4\uae30",3002:"\uc218\uc2e0 \uac70\ubd80 \uc774\ubca4\ud2b8 \uc2dc\uc791"};
173 -h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\uc798\ubabb\ub41c ME \uc561\uc138\uc2a4","\uc798\ubabb\ub41c MEBx \uc561\uc138\uc2a4"][b.charCodeAt(0)];if(1606==a){var c=["\ube44\ud65c\uc131\ud654","\uac00\ub2a5"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\uba3c"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(0)]+
174 -", \ud604\uc9c0"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+","+["NoAuth","\uc778\uc99d","\ube44\ud65c\uc131\ud654"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\ud604\uc9c0 MEI","\ub85c\uceec WSMAN","\uc6d0\uaca9 WSAMN"][b.charCodeAt(0)]:1900==a?"\uc5d0\uc11c"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \uc5d0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*
175 -ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\uc5d0\uc11c"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(0)]+" \uc5d0"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(1)]:3001==a?["\uc131\uacf5","3 \ud68c \uc2e4\ud328"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
167 +1703:"\ub9ac\uc14b \uc218\ud589",1704:"\ubd80\ud305 \uc635\uc158 \uc124\uc815",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"IDER \uc138\uc158 \uac1c\uc124",1801:"IDER \uc138\uc158 \uc885\ub8cc",1802:"IDER \uc0ac\uc6a9",1803:"IDER \ube44\ud65c\uc131\ud654",1804:"SoL \uc138\uc158 \uac1c\uc124",1805:"SoL \uc138\uc158 \ub9c8\uac10",1806:"SoL \uc0ac\uc6a9",1807:"SoL \ube44\ud65c\uc131\ud654",
168 +1808:"KVM \uc138\uc158 \uc2dc\uc791",1809:"KVM \uc138\uc158 \uc885\ub8cc",1810:"KVM \uc0ac\uc6a9",1811:"KVM \ube44\ud65c\uc131\ud654",1812:"VNC \uc554\ud638\uac00 3 \ubc88 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4",1900:"\ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8",1901:"\ud38c\uc6e8\uc5b4 \uc5c5\ub370\uc774\ud2b8 \uc2e4\ud328",2E3:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8\uac00 \uc9c0\uc6cc\uc9d0",2001:"\ubcf4\uc548 \uac10\uc0ac \uc815\ucc45 \uc218\uc815",2002:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \ube44\ud65c\uc131\ud654",
169 +2003:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \uc0ac\uc6a9",2004:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \ub0b4\ubcf4\ub0b4\uae30",2005:"\ubcf4\uc548 \uac10\uc0ac \ub85c\uadf8 \ubcf5\uad6c",2100:"\uc778\ud154 &reg; ME \uc2dc\uac04 \uc124\uc815",2200:"TCPIP \ub9e4\uac1c \ubcc0\uc218 \uc138\ud2b8",2201:"\ud638\uc2a4\ud2b8 \uc774\ub984 \uc138\ud2b8",2202:"\ub3c4\uba54\uc778 \uc774\ub984 \uc138\ud2b8",2203:"VLAN \ub9e4\uac1c \ubcc0\uc218 \uc138\ud2b8",2204:"\ub9c1\ud06c \uc815\ucc45 \uc138\ud2b8",2205:"IPv6 \ub9e4\uac1c \ubcc0\uc218 \uc138\ud2b8",
170 +2300:"\uae00\ub85c\ubc8c \uc2a4\ud1a0\ub9ac\uc9c0 \uc18d\uc131 \uc138\ud2b8",2301:"\uc2a4\ud1a0\ub9ac\uc9c0 EACL \uc218\uc815",2302:"\uc2a4\ud1a0\ub9ac\uc9c0 FPACL \uc218\uc815",2303:"\uc2a4\ud1a0\ub9ac\uc9c0 \uc4f0\uae30 \uc791\uc5c5",2400:"\uc54c\ub9bc \uad6c\ub3c5",2401:"\uc218\uc2e0 \uac70\ubd80 \uc54c\ub9bc",2402:"\uc774\ubca4\ud2b8 \ub85c\uadf8\uac00 \uc9c0\uc6cc\uc9d0",2403:"\uc774\ubca4\ud2b8 \ub85c\uadf8 \uace0\uc815",2500:"CB \ud544\ud130 \ucd94\uac00",2501:"CB \ud544\ud130 \uc81c\uac70",
171 +2502:"CB \uc815\ucc45 \ucd94\uac00",2503:"CB \uc815\ucc45 \uc81c\uac70",2504:"CB \uae30\ubcf8 \uc815\ucc45 \uc138\ud2b8",2505:"CB \ud734\ub9ac\uc2a4\ud2f1 \uc635\uc158 \uc138\ud2b8",2506:"CB \ud734\ub9ac\uc2a4\ud2f1 \uc0c1\ud0dc \uc9c0\uc6b0\uae30",2600:"\uc5d0\uc774\uc804\ud2b8 \uac10\uc2dc\uc790 \ucd94\uac00",2601:"\uc5d0\uc774\uc804\ud2b8 \uac10\uc2dc\uc790 \uc81c\uac70",2602:"\uc5d0\uc774\uc804\ud2b8 \uc6cc\uce58 \ub3c5 \uc870\uce58 \uc138\ud2b8",2700:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \ucd94\uac00",
172 +2701:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \uc81c\uac70",2702:"\ubb34\uc120 \ud504\ub85c\ud30c\uc77c \uc5c5\ub370\uc774\ud2b8",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC \uc790\uc138 \uc11c\uba85\uc790 SET",2801:"EAC \ud65c\uc131\ud654",2802:"EAC \ube44\ud65c\uc131\ud654",2803:"EAC \uc790\uc138 \uc0c1\ud0dc",2804:"EAC \uc124\uc815 \uc635\uc158",2900:"KVM \uc635\ud2b8 \uc778 \ud65c\uc131\ud654",
173 +2901:"KVM \uc635\ud2b8 \uc778 \ube44\ud65c\uc131\ud654",2902:"KVM \ube44\ubc00\ubc88\ud638 \ubcc0\uacbd",2903:"KVM \ub3d9\uc758 \uc131\uacf5",2904:"KVM \ub3d9\uc758 \uc2e4\ud328",3E3:"\uc635\ud2b8 \uc778 \uc815\ucc45 \ubcc0\uacbd",3001:"\ub3d9\uc758 \ucf54\ub4dc \uc774\ubca4\ud2b8 \ubcf4\ub0b4\uae30",3002:"\uc218\uc2e0 \uac70\ubd80 \uc774\ubca4\ud2b8 \uc2dc\uc791",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
174 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\uc798\ubabb\ub41c ME \uc561\uc138\uc2a4","\uc798\ubabb\ub41c MEBx \uc561\uc138\uc2a4"][b.charCodeAt(0)];if(1606==a){var c=["\ube44\ud65c\uc131\ud654","\uac00\ub2a5"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\uba3c"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(0)]+
175 +", \ud604\uc9c0"+["NoAuth","ServerAuth","\uc0c1\ud638 \uc778\uc99d"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","\uc778\uc99d","\ube44\ud65c\uc131\ud654"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\ud604\uc9c0 MEI","\ub85c\uceec WSMAN","\uc6d0\uaca9 WSAMN"][b.charCodeAt(0)]:1900==a?"\uc5d0\uc11c"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \uc5d0"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*
176 +ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\uc5d0\uc11c"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(0)]+" \uc5d0"+["\uc5c6\uc74c","KVM","\ubaa8\ub450"][b.charCodeAt(1)]:3001==a?["\uc131\uacf5","3 \ud68c \uc2e4\ud328"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
177 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
178 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
179 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
180 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
181 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
181 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
182 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
183 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
184 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
185 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
186 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
187 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
188 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
189 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
182 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
183 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
184 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
185 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
186 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
187 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
188 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
189 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
190 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
191 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
192 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
193 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -197,10 +198,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
198 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
199 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
200 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
200 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
201 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
202 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
202 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
203 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
203 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
204 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
205 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
206 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
207 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -210,69 +211,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
211 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
212 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
213 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
213 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
214 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
215 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
216 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
217 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
218 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
219 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
220 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
214 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
215 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
216 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
217 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
218 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
219 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
220 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
221 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
222 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
222 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
223 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
224 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
225 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
226 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
227 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
228 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
229 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
230 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
231 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
232 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
233 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
234 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
235 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
223 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
224 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
225 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
226 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
227 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
228 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
229 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
230 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
231 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
232 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
233 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
234 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
235 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
236 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
237 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
238 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
239 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
240 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
240 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
241 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
242 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
241 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
242 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
243 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
244 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
245 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
246 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
247 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
248 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
248 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
249 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
250 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
251 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
252 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
253 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
254 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
255 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
249 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
250 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
251 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
252 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
253 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
254 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
255 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
256 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
257 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
258 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
259 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
259 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
260 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
261 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
262 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
263 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
264 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
265 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
266 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
267 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
268 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
269 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
270 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
271 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
260 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
261 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
262 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
263 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
264 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
265 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
266 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
267 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
268 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
269 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
270 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
271 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
272 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
273 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
273 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
274 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
275 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
274 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
275 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
276 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
277 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
278 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
279 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -286,213 +287,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
287 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
288 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
289 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
289 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
290 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
291 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
291 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
292 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
293 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
294 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
295 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
296 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
297 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
298 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
292 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
293 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
294 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
295 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
296 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
297 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
298 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
299 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
300 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
300 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
301 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
302 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
301 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
302 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
303 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
304 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
305 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
305 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
306 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
307 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
307 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
308 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
309 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
309 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
310 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
311 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
312 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
313 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
314 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
315 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
316 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
317 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
318 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
319 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
320 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
321 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
310 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
311 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
312 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
313 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
314 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
315 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
316 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
317 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
318 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
319 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
320 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
321 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
322 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
323 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
323 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
324 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
325 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
326 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
327 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
328 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
329 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
330 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
331 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
324 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
325 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
326 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
327 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
328 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
329 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
330 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
331 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
332 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
333 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
334 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
335 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
336 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
337 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
338 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
338 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
339 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
340 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
341 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
342 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
343 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
339 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
340 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
341 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
342 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
343 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
344 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
345 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
345 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
346 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
347 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
347 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
348 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
349 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
350 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
351 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
352 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
353 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
354 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
355 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
356 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
348 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
349 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
350 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
351 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
352 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
353 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
354 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
355 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
356 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
357 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
358 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
358 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
359 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
360 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
361 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
362 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
359 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
360 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
361 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
362 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
363 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
364 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
365 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
366 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
366 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
367 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
368 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
369 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
370 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
370 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
371 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
372 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
373 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
374 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
375 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
376 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
371 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
372 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
373 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
374 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
375 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
376 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
377 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
378 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
378 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
379 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
380 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
381 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
382 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
379 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
380 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
381 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
382 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
383 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
384 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
384 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
385 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
386 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
387 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
387 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
388 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
388 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
389 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
390 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
391 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
391 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
392 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
393 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
394 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
392 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
393 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
394 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
395 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
396 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
396 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
397 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
398 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
399 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
397 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
398 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
399 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
400 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
401 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
402 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
403 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
403 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
404 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
405 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
406 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
407 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
408 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
409 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
410 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
411 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
412 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
413 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
414 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
404 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
405 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
406 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
407 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
408 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
409 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
410 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
411 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
412 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
413 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
414 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
415 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
416 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
416 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
417 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
418 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
417 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
418 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
419 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
420 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
420 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
421 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
422 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
423 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
424 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
421 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
422 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
423 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
424 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
425 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
426 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
426 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
427 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
428 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
428 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
429 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
430 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
429 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
430 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
431 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
432 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
432 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
433 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
434 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
435 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
436 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
437 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
438 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
439 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
440 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
441 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
442 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
443 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
444 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
445 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
446 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
447 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
448 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
449 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
450 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
433 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
434 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
435 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
436 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
437 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
438 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
439 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
440 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
441 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
442 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
443 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
444 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
445 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
446 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
447 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
448 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
449 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
450 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
451 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
452 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
452 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
453 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
454 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
454 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
455 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
456 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
457 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
457 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
458 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
459 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
460 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
461 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
462 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
463 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
464 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
465 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
466 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
467 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
468 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
469 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
470 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
471 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
472 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
473 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
458 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
459 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
460 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
461 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
462 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
463 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
464 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
465 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
466 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
467 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
468 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
469 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
470 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
471 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
472 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
473 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
474 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
475 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
476 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
477 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
477 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
478 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
479 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
478 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
479 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
480 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
481 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
481 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
482 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
483 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
484 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
485 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
486 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
487 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
488 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
488 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
489 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
490 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
491 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
489 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
490 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
491 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
492 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
493 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
493 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
494 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
495 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
494 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
495 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
496 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
497 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
498 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
499 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -510,111 +511,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
511 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
512 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
513 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
513 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
514 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
515 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
516 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
514 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
515 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
516 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
517 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
518 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
518 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
519 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
520 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
521 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
522 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
519 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
520 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
521 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
522 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
523 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
524 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
524 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
525 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
526 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
527 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
528 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
528 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
529 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
529 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
530 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
531 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
532 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
533 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
533 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
534 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
535 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
536 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
537 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
538 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
539 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
540 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
540 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
541 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
542 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
542 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
543 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
544 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
545 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
546 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
547 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
548 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
549 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
543 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
544 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
545 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
546 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
547 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
548 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
549 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
550 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
551 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
552 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
552 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
553 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
554 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
554 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
555 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
556 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
556 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
557 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
558 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
559 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
560 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
561 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
562 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
563 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
557 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
558 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
559 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
560 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
561 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
562 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
563 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
564 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
565 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
566 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
566 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
567 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
568 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
569 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
570 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
567 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
568 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
569 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
570 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
571 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
572 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
572 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
573 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
574 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
575 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
576 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
577 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
578 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
579 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
580 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
581 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
582 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
583 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
584 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
585 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
586 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
587 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
573 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
574 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
575 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
576 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
577 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
578 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
579 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
580 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
581 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
582 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
583 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
584 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
585 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
586 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
587 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
588 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
589 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
589 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
590 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
591 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
592 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
593 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
594 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
590 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
591 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
592 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
593 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
594 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
595 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
596 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
597 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
597 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
598 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
598 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
599 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
600 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
600 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
601 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
602 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
602 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
603 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
604 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
605 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
606 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
607 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
603 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
604 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
605 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
606 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
607 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
608 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
609 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
609 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
610 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
611 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
610 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
611 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
612 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
613 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
614 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
615 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
616 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
617 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
617 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
618 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
619 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
620 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
621 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -625,20 +626,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
626 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
627 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
628 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
628 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
629 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
629 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
630 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
631 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
631 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
632 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
632 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
633 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
634 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
635 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
635 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
636 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
637 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
638 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
639 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
640 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
640 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
641 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
641 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
642 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
643 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
644 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
645 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -647,20 +648,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
648 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
649 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
650 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
650 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
651 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
652 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
653 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
654 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
655 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
655 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
656 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
657 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
658 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
659 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
660 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
656 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
657 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
658 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
659 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
660 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
661 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
662 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
662 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
663 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
663 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
664 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
665 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
666 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
667 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -684,17 +685,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
685 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
686 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
687 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
687 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
688 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
689 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
690 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
688 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
689 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
690 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
691 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
692 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
693 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
694 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
695 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
696 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
696 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
697 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
697 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
698 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
699 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
700 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
701 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -710,48 +711,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
711 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
712 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
713 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
713 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
714 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
715 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
716 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
717 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
718 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
719 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
720 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
720 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
721 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
722 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
723 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
724 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
724 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
725 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
726 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
726 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
727 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
728 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
729 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
729 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
730 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
731 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
732 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
733 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
734 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
734 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
735 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
736 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
737 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
735 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
736 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
737 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
738 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
739 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
740 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
741 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
742 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
743 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
743 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
744 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
745 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
745 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
746 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
747 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
746 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
747 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
748 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
749 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
750 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
751 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
751 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
752 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
753 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
753 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
754 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
754 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
755 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
756 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
757 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
758 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -759,119 +760,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
760 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
761 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
762 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
762 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
763 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
764 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
765 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
766 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
767 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
768 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
769 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
770 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
771 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
772 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
773 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
774 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
775 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
776 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
777 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
778 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
779 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
780 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
781 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
782 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
783 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
784 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
785 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
786 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
787 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
788 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
789 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
790 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
791 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
792 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
793 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
794 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
795 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
796 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
797 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
798 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
799 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
800 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
801 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
802 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
803 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
804 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
805 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
806 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
807 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
808 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
809 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
810 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
811 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
812 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
813 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
814 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
815 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
816 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
817 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
818 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
819 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
820 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
821 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
822 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
823 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
824 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
825 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
826 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
827 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
828 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
829 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
830 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
831 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
832 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
833 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
834 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
835 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
836 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
837 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
838 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
839 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
840 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
841 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
842 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
843 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
844 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
845 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
846 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
847 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
848 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
849 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
850 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
851 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
852 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
853 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
854 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
855 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
856 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
763 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
764 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
765 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
766 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
767 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
768 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
769 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
770 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
771 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
772 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
773 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
774 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
775 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
776 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
777 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
778 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
779 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
780 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
781 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
782 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
783 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
784 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
785 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
786 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
787 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
788 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
789 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
790 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
791 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
792 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
793 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
794 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
795 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
796 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
797 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
798 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
799 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
800 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
801 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
802 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
803 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
804 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
805 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
806 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
807 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
808 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
809 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
810 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
811 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
812 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
813 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
814 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
815 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
816 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
817 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
818 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
819 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
820 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
821 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
822 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
823 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
824 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
825 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
826 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
827 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
828 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
829 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
830 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
831 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
832 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
833 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
834 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
835 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
836 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
837 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
838 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
839 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
840 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
841 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
842 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
843 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
844 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
845 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
846 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
847 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
848 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
849 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
850 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
851 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
852 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
853 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
854 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
855 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
856 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
857 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
858 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
859 +l.Init();return l},ZLIB=ZLIB||{};
860 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
861 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
859 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
860 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
861 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
862 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
863 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
864 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
865 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
863 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
864 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
866 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
867 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
868 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
869 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
867 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
868 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
869 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
870 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
870 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
871 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
872 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
873 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
874 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
875 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
873 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
874 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
876 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
877 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
878 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
879 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
880 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -893,22 +896,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
896 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
897 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
898 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
896 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
897 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
898 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
899 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
900 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
899 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
900 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
901 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
902 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
903 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
904 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
905 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
906 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
907 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
908 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
906 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
907 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
909 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
910 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
911 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
909 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
910 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
911 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
912 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
913 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
914 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
915 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
916 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
917 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -924,16 +927,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
927 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
928 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
929 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
927 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
928 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
929 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
930 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
931 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
932 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
933 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
930 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
931 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
932 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
933 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
934 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
935 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
936 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
937 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
935 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
936 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\ubd88\ub7ec\uc624\ub294 \uc911 ...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
938 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
939 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\ubd88\ub7ec\uc624\ub294 \uc911 ...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
940 StatusStrs=["\uc5f0\uacb0 \ud574\uc81c","\uc5f0\uacb0 \uc911 ...","\uc124\uc815...","\uc5f0\uacb0\ub428"],t,t2,rsepass=null;
941 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
942 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -968,15 +971,15 @@ function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=T
971 amtsysstate.IPS_PowerManagementService.response&&3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", \ud50c\ub7ec\uadf8\uc778","\ubc30\ud130\ub9ac \uc0ac\uc6a9"][v.PowerSource]);d+=TableEntry("\ud798",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\uc5c6\uc74c</i>":EscapeHtml(c);d+=TableEntry("\uc774\ub984 \ubc0f \ub3c4\uba54\uc778",
972 addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\uc2dc\uc2a4\ud15c ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\uc2dc\uc2a4\ud15c ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \uad00\ub9ac \uc81c\uc5b4 \ubaa8\ub4dc (ACM)\uc5d0\uc11c \ud65c\uc131\ud654",
973 4==l.ProvisioningMode&&(n=" \ud074\ub77c\uc774\uc5b8\ud2b8 \uc81c\uc5b4 \ubaa8\ub4dc (CCM)\uc5d0\uc11c \ud65c\uc131\ud654",b=9));d+=TableEntry("\uc778\ud154 &reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,
971 -2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
972 -2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+=", \ub9ac\ub514\ub809\uc158 \ud3ec\ud2b8");q&&(e+=", Serial-over-LAN");n&&(e+="IDE \ub9ac\ub514\ub809\uc158");h&&(e+=", KVM");""==e&&(e=" \uc5c6\uc74c");d+=TableEntry("\ud65c\uc131 \uae30\ub2a5",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
974 +2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
975 +2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);q&&(e+=", \ub9ac\ub514\ub809\uc158 \ud3ec\ud2b8");p&&(e+=", Serial-over-LAN");n&&(e+="IDE \ub9ac\ub514\ub809\uc158");g&&(e+=", KVM");""==e&&(e=" \uc5c6\uc74c");d+=TableEntry("\ud65c\uc131 \uae30\ub2a5",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
976 amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\uae30\ubcf8 \ub514\uc2a4\ud50c\ub808\uc774",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\uae30\ubcf8 \ub514\uc2a4\ud50c\ub808\uc774","\ubcf4\uc870 \ub514\uc2a4\ud50c\ub808\uc774","\uc138\ubc88\uc9f8 \ub514\uc2a4\ud50c\ub808\uc774"][n.DefaultScreen]),e='<span title="'+format("\uae30\ubcf8 \uc6d0\uaca9 \ub514\uc2a4\ud50c\ub808\uc774\ub294 {0}\uc785\ub2c8\ub2e4.",e.toLowerCase())+
977 '">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\ud3ec\ud2b8 5900 \uc0ac\uc6a9"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\ucd08 \uc635\ud2b8 \uc778":"\ub450 \ubc88\uc9f8 \uc635\ud2b8 \uc778")),e+=","+n.SessionTimeout+" \ubd84"+(0<n.SessionTimeout?"s":"")+" \uc138\uc158 \ud0c0\uc784 \uc544\uc6c3",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", \ube14\ub7ad\ud0b9 \ud5c8\uc6a9"),
975 -QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\uc54c \uc218\uc5c6\ub294 \uc0c1\ud0dc",p=amtsysstate.IPS_OptInService.response.OptInRequired,
976 -0==p&&(e="\ubd88\ud544\uc694"),1==p&&(e="KVM\uc5d0\ub9cc \ud544\uc694"),4294967295==p&&(e="\ud56d\uc0c1 \ud544\uc218"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\uc0ac\uc6a9\uc790 \ub3d9\uc758",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\uc54c \uc218 \uc5c6\ub294",1:"\ub2e4\ub978",2:"\uac00\ub2a5",3:"\ube44\ud65c\uc131\ud654",
978 +QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\uc54c \uc218\uc5c6\ub294 \uc0c1\ud0dc",q=amtsysstate.IPS_OptInService.response.OptInRequired,
979 +0==q&&(e="\ubd88\ud544\uc694"),1==q&&(e="KVM\uc5d0\ub9cc \ud544\uc694"),4294967295==q&&(e="\ud56d\uc0c1 \ud544\uc218"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\uc0ac\uc6a9\uc790 \ub3d9\uc758",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\uc54c \uc218 \uc5c6\ub294",1:"\ub2e4\ub978",2:"\uac00\ub2a5",3:"\ube44\ud65c\uc131\ud654",
980 4:"\uc885\ub8cc",5:"\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c",6:"\ud65c\uc131\ud654\ub418\uc5c8\uc9c0\ub9cc \uc624\ud504\ub77c\uc778",7:"\ud14c\uc2a4\ud2b8 \uc911",8:"\uc5f0\uae30 \ub428",9:"Quiesce",10:"\uc2dc\uc791",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:
978 -"\uc54c \uc218 \uc5c6\ub294",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==
979 -p&&(d+=TableEntry("\uc804\uc6d0 \uc815\ucc45",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\ub0a0\uc9dc \uc2dc\uac04",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\uc804\uc6d0 \ub3d9\uc791 ...","showPowerActionDlg()")+" ";e+=AddButton("\uc0c1\ud0dc \uc800\uc7a5 ...",
981 +"\uc54c \uc218 \uc5c6\ub294",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==
982 +q&&(d+=TableEntry("\uc804\uc6d0 \uc815\ucc45",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\ub0a0\uc9dc \uc2dc\uac04",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\uc804\uc6d0 \ub3d9\uc791 ...","showPowerActionDlg()")+" ";e+=AddButton("\uc0c1\ud0dc \uc800\uc7a5 ...",
983 "saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \ub124\ud2b8\uc6cc\ud06c \uc124\uc815\uc744 \ubcc0\uacbd\ud558\uba74\uc774 \ud398\uc774\uc9c0\ub97c \uc0ac\uc6a9\ud558\uc9c0 \ubabb\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.");
984 d=d+"<br><h2>\uc77c\ubc18 \uc124\uc815</h2>"+TableStart();e="";"<i>\uc5c6\uc74c</i>"!=c&&(1==v.SharedFQDN&&(e=", OS\uc640 \uacf5\uc720"),0==v.SharedFQDN&&(e="OS\uc640 \ub2e4\ub978"));d+=TableEntry("\uc774\ub984 \ubc0f \ub3c4\uba54\uc778",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="\ube44\ud65c\uc131\ud654";1==v.DDNSUpdateEnabled?c="\uac01\uac01 \ud65c\uc131\ud654"+v.DDNSPeriodicUpdateInterval+" \ubd84, TTL\uc740"+v.DDNSTTL+" \uc758\uc0ac\ub85d":1==v.DDNSUpdateByDHCPServerEnabled&&
985 (c="DHCP \uc11c\ubc84\ub85c \uc5c5\ub370\uc774\ud2b8");d+=TableEntry("\ub3d9\uc801 DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"\ubb34\uc120 \uc778\ud130\ud398\uc774\uc2a4":"\uc720\uc120 \uc778\ud130\ud398\uc774\uc2a4")+
@@ -986,8 +989,8 @@ xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:
989 "showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654","showUefiWifiCoExDlg()",
990 xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\ud551\uc5d0 \uc751\ub2f5",addLinkConditional(["\ube44\ud65c\uc131\ud654","ICMP \uc751\ub2f5","RMCP \uc751\ub2f5","ICMP \ubc0f RMCP \uc751\ub2f5"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=1==c.DHCPEnabled?"DHCP \uc11c\ubc84\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc790\ub3d9":"\uace0\uc815 IP \uc8fc\uc18c",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),
991 d+=TableEntry("IPv4 \uc0c1\ud0dc",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4 \uc8fc\uc18c",isIpAddress(c.IPAddress,"\uc5c6\uc74c"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4 \uac8c\uc774\ud2b8\uc6e8\uc774 / \ub9c8\uc2a4\ud06c",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\uc5c6\uc74c")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4 \ub3c4\uba54\uc778 \uc774\ub984 \uc11c\ubc84",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&
989 -5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\ube44\ud65c\uc131\ud654",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\uc0ac\uc6a9, \uc790\ub3d9 \ubc0f \uc218\ub3d9 \uc8fc\uc18c":"\uc0ac\uc6a9, \uc790\ub3d9 \uc8fc\uc18c");
990 -d+=TableEntry("IPv6 \uc0c1\ud0dc",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6 \uc8fc\uc18c",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6 \uc8fc\uc18c",
992 +5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="\ube44\ud65c\uc131\ud654",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\uc0ac\uc6a9, \uc790\ub3d9 \ubc0f \uc218\ub3d9 \uc8fc\uc18c":"\uc0ac\uc6a9, \uc790\ub3d9 \uc8fc\uc18c");
993 +d+=TableEntry("IPv6 \uc0c1\ud0dc",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6 \uc8fc\uc18c",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6 \uc8fc\uc18c",
994 "\uc5c6\uc74c");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 \uae30\ubcf8 \ub77c\uc6b0\ud130",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6 \ub3c4\uba54\uc778 \uc774\ub984 \uc11c\ubc84",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&
995 PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
996 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
@@ -1036,8 +1039,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1039 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\ube44\ud65c\uc131\ud654":"\uac00\ub2a5",c&2&&(b+=", \uc7a0\uae40"),c&4&&(b+=", \uac70\uc758 \uc804\uccb4"),c&8&&(b+=", \uc804\uccb4"),c&16&&(b+=", NoKey"),c="<h1>\uac10\uc0ac \ub85c\uadf8 \uc124\uc815</h1>"+TableStart(),c+=TableEntry("\uc0c1\ud0dc",b),c+=TableEntry("\uc800\uc7a5",a[0].CurrentNumberOfRecords+" \uae30\ub85d,"+a[0].PercentageFree+"% \ubb34\ub8cc"),c+=TableEntry("\uc815\ucc45 \ub36e\uc5b4 \uc4f0\uae30",
1040 2==a[0].OverwritePolicy?"\uac00\ub4dd \ucc28\uba74 \ub7a9":"\ub36e\uc5b4 \uc4f0\uc9c0 \uc54a\uc74c"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1041 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\ud544\ud130" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\uc800\uc7a5...","SaveAuditLog()")+AddButton("\ub85c\uadf8 \uc9c0\uc6b0\uae30","ClearAuditLog()"))+"<br>");if(0==c.length)d="\uac10\uc0ac \ub85c\uadf8 \uc774\ubca4\ud2b8\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.";
1039 -else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\uc2dc\uac01</b><td class=r1 style=width:260px><b>\ucc3d\uc2dc\uc790</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=
1040 -l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1042 +else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\uc2dc\uac01</b><td class=r1 style=width:260px><b>\ucc3d\uc2dc\uc790</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=
1043 +l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1044 function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\uc778\ud154 AMT \uac10\uc0ac \ub85c\uadf8",auditLog)}
1045 function ClearAuditLog(b){QH(60,"\uac10\uc0ac \ub85c\uadf8\ub97c \uc9c0\uc6b0\uc2dc\uaca0\uc2b5\ub2c8\uae4c?");setDialogMode(1,"\uac10\uc0ac \ub85c\uadf8",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}
1046 function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\uac10\uc0ac \ub85c\uadf8","\uc624\ub958: "+d)}
@@ -1094,7 +1097,7 @@ var watchdogEnabledStates="\uc54c \uc218 \uc5c6\ub294;\ub2e4\ub978;\uac00\ub2a5;
1097 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("\ucd5c\ub300 \uc6cc\uce58 \ub3c5",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" \uac10\uc2dc\uacac");b+=TableEntry("\ucd5c\ub300 \ucd1d \uc561\uc158",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \ud589\uc704");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\uc778\ud154 &reg; AMT \uc5d0\uc774\uc804\ud2b8 \uc874\uc7ac \uac10\uc2dc \uae30\ub2a5\uc744 \uad00\ub9ac\ud558\uc2ed\uc2dc\uc624.<br><br>";
1098 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\uc0c1\ub2f4\uc6d0 \uc874\uc7ac \uac10\uc2dc\uae30\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1099 b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\uc561\uc158 \ucd94\uac00 ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\uc791\uc5c5 \uc0ad\uc81c ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1097 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=": \uae30\ub85d \ud560 \uc774\ubca4\ud2b8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\uc6cc\uce58 \ub3c5 \ucd94\uac00 ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1100 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \uae30\ub85d \ud560 \uc774\ubca4\ud2b8")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\uc6cc\uce58 \ub3c5 \ucd94\uac00 ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1101 function getWatchdogTransitionStr(b){if(31==b)return"\uc5b4\ub5a4 \uc8fc";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1102 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\uae30\uc220",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\ubaa8\ub2c8\ud130\ub9c1 \ub300\uc0c1",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\ud604\uc7ac \uc0c1\ud0dc",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\ud65c\uc131\ud654 \ub41c \uc0c1\ud0dc",watchdogEnabledStates[b.EnabledState]);
1103 c+=addHtmlValue("\uc2dc\uc791 \uac04\uaca9",b.StartupInterval+" \ucd08");c+=addHtmlValue("\ud0c0\uc784 \uc544\uc6c3 \uac04\uaca9",b.TimeoutInterval+" \ucd08");setDialogMode(11,format("\uc6cc\uce58 \ub3c5 {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1197,8 +1200,8 @@ function updateAccounts(){if(!(0<xxAccountFetch)){var b=TableStart2(),b=b+"<tr><
1200 function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1201 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\uacc4\uc815 \ud3b8\uc9d1",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1202 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\uc0c8 \uacc4\uc815",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1200 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\uacc4\uc815 \uc624\ub958","\uc798\ubabb\ub41c \ub9e4\uac1c \ubcc0\uc218");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&
1201 -a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1203 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\uacc4\uc815 \uc624\ub958","\uc798\ubabb\ub41c \ub9e4\uac1c \ubcc0\uc218");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&
1204 +a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1205 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\uad00\ub9ac\uc790</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1206 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\uc9c0\uc5ed \ub9cc","\ub124\ud2b8\uc6cc\ud06c \ub9cc","\ubaa8\ub450 (\ub85c\uceec \ubc0f \ub124\ud2b8\uc6cc\ud06c)"];
1207 function showUserDetails(b){if(!xxdialogMode){var c=xxAccountRealmInfo[b],a="<div style=text-align:left>",d,e=c.DigestUsername;e||(e=GetSidString(atob(c.KerberosUserSid)));a+=addHtmlValue("\uc774\ub984",e);xxAccountEnabledInfo[b]&&(a+=addHtmlValue("\uc0c1\ud0dc",1==xxAccountEnabledInfo[b].Enabled?"\uac00\ub2a5":"\ube44\ud65c\uc131\ud654"));if(e==xxAccountAdminName)a+=addHtmlValue("\ud5c8\uac00","\uad00\ub9ac\uc790");else{var a=a+addHtmlValue("\ud5c8\uac00",xxUserPermissions[c.AccessPermission]),v=
@@ -1215,8 +1218,8 @@ b+".txt")}delete terminal.m.capture;c3.value="\ucea1\ucc98 \uc2dc\uc791"}}functi
1218 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1219 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1220 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1218 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1219 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1221 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1222 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1223 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1224 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1225 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1227,14 +1230,16 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1230 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1231 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1232 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\uc787\ub2e4":"\ubd84\ub9ac";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","The device indicated that this type of connection of not supported."):
1230 -5E4==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1231 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uc18c\ud504\ud2b8 -KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud1b1 \uc124\uc815",3,showDesktopSettingsChanged))}
1233 +5E4==b.disconnectCode?messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud0d1","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1234 +break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1235 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uc18c\ud504\ud2b8 -KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}
1236 +function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\uc6d0\uaca9 \ub370\uc2a4\ud06c\ud1b1 \uc124\uc815",3,showDesktopSettingsChanged))}
1237 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1238 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1234 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1235 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1236 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1237 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1239 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1240 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1241 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1242 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1243 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1244 "8px"),center()))}
1245 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\uc6d0\uaca9 \ud0a4\ubcf4\ub4dc \uc785\ub825",3,showDeskTypeEx,'<div>\ud14d\uc2a4\ud2b8\ub97c \uc785\ub825\ud558\uace0 \ud655\uc778\uc744 \ud074\ub9ad\ud558\uc5ec \ubbf8\uad6d \uc601\uc5b4 \ud0a4\ubcf4\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc6d0\uaca9\uc73c\ub85c \uc785\ub825\ud558\uc2ed\uc2dc\uc624. \uacc4\uc18d\ud558\uae30 \uc804\uc5d0 \uc6d0\uaca9 \ucee4\uc11c\ub97c \uc62c\ubc14\ub978 \uc704\uce58\uc5d0 \ub193\uc73c\uc2ed\uc2dc\uc624.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1245,13 +1250,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1250 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1251 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1252 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1248 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1253 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1254 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1255 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1256 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1252 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\ubfcc\ub9ac</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+
1253 -EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1254 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1257 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\ubfcc\ub9ac</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+
1258 +EscapeHtml(q.substring(0,70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1259 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1260 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1261 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1262 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1380,10 +1385,10 @@ amtsysstate.CIM_BootService.response.EnabledState&2&&(b&2&&addOption("d5actionSe
1385 d))}
1386 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"\uc804\uc6d0 \uc791\uc5c5\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4."):QH(60,format("\uc804\uc6d0 \uc791\uc5c5 \uc624\ub958 # {0}.",e));setDialogMode(1,"\ud30c\uc6cc \uc561\uc158",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Intel&reg; Remote Secure Erase \uc2e4\ud589\uc744 \ud655\uc778 \ud558\uc2dc\uaca0\uc2b5\ub2c8\uae4c?<br>\ud544\uc694\ud55c \uacbd\uc6b0 \ubcf4\uc548 \uc9c0\uc6b0\uae30 \ube44\ubc00\ubc88\ud638\ub97c \uc785\ub825\ud558\uc2ed\uc2dc\uc624.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\uc554\ud638</div></div><br><div style=color:red><b> \uacbd\uace0 : </ b> \uc6d0\uaca9 \uc2dc\uc2a4\ud15c\uc758 \ub370\uc774\ud130\ub97c \uc9c0 \uc6c1\ub2c8\ub2e4.</div>",rsepass=
1387 1,setDialogMode(11,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1383 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> \uacbd\uace0 : </ b> \uc6d0\uaca9 \uc2dc\uc2a4\ud15c\uc758 \ub370\uc774\ud130\ub97c \uc9c0 \uc6c1\ub2c8\ub2e4.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");
1384 -d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");
1385 -1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,
1386 -"\ud30c\uc6cc \uc561\uc158",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1388 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> \uacbd\uace0 : </ b> \uc6d0\uaca9 \uc2dc\uc2a4\ud15c\uc758 \ub370\uc774\ud130\ub97c \uc9c0 \uc6c1\ub2c8\ub2e4.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1389 +d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1390 +a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\ud30c\uc6cc \uc561\uc158",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1391 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1392 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\ud30c\uc6cc \uc561\uc158","\uc0c1\ud0dc \ud655\uc778 \uc911 ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1393 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\ud30c\uc6cc \uc561\uc158","\uc0c1\ud0dc \ud655\uc778 \uc911 ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==
1394 b&&(c=!1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1419,10 +1424,10 @@ function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\uc804\uc6d0 \uc791\uc5c5
1424 function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1425 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1426 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1422 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1423 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc774 \ucef4\ud4e8\ud130\uc758 \uc778\ud154 &reg; AMT \uc2a4\ud1a0\ub9ac\uc9c0\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||
1424 -p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\ubfcc\ub9ac";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\ub2e4\uc6b4\ub85c\ub4dc","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" \ubc14\uc774\ud2b8</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);
1425 --1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+=
1427 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1428 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc774 \ucef4\ud4e8\ud130\uc758 \uc778\ud154 &reg; AMT \uc2a4\ud1a0\ub9ac\uc9c0\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||
1429 +q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+" / "+q):e+"\ubfcc\ub9ac";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\ub2e4\uc6b4\ub85c\ub4dc","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" \ubc14\uc774\ud2b8</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);
1430 +-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\ud30c\uc77c\uc774 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+=
1431 "<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\uc5c5\ub85c\ub4dc ...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\uc2a4\ud1a0\ub9ac\uc9c0 \ub370\uc774\ud130\ub97c\ub85c\ub4dc \ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4 ...<br/>"+AddButton("\uc0c8\ub86d\uac8c \ud558\ub2e4","PullStorage()"))}
1432 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\uacf5\uae09 \uc5c5\uccb4",b));""!=c&&(e+=addHtmlValue("\uc2e0\uccad",c));e+=addHtmlValue("\uc774\ub984",a);e+=addHtmlValue("\ud06c\uae30",v.size+" bytes");v.link&&(e+=addHtmlValue("\ub9c1\ud06c",v.link));setDialogMode(11,"\ubcf4\uad00 \uc544\uc774\ud15c",5,showStorageDetailsEx,e,d)}}
1433 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("\uc800\uc7a5",format("\ud30c\uc77c (ERR {0})\uc744 \uc0ad\uc81c\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \ucef4\ud4e8\ud130 \uc804\uc6d0\uc774 \ucf1c\uc838 \uc788\ub294\uc9c0 \ud655\uc778\ud558\uc2ed\uc2dc\uc624.",c)):PullStorage()}
@@ -1438,7 +1443,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1443 b}
1444 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1445 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1441 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \uc77c").replace("H"," \uc2dc\uac04").replace("M"," \uc758\uc0ac\ub85d");b=b.replace(" 1 \uc77c"," 1 \uc77c").replace(" 1 \uc2dc\uac04"," 1 \uc2dc\uac04").replace(" 1 \ubd84"," 1 \ubd84");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1446 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \uc77c").replace("H"," \uc2dc\uac04").replace("M"," \uc758\uc0ac\ub85d");b=b.replace(" 1 \uc77c"," 1 \uc77c").replace(" 1 \uc2dc\uac04"," 1 \uc2dc\uac04").replace(" 1 \ubd84 "," 1 \ubd84 ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1447 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\uc54c\ub78c \uae68\uc6b0\uae30\ub97c \uad00\ub9ac\ud569\ub2c8\ub2e4.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \uc77c\uc5b4\ub098 "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," ...\uc5d0\uc11c"),void 0!=d[c].Interval&&(a+=" \uadf8\ub9ac\uace0 \uac01\uac01"+_fmtinterval(d[c].Interval.Interval)),
1448 1==d[c].DeleteOnCompletion&&(a+="\uc644\ub8cc\ub418\uba74 \uc0ad\uc81c"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\ud3b8\uc9d1\ud558\ub2e4...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\ub4f1\ub85d \ub41c \uae68\uc6b0\uae30 \uacbd\ubcf4\uac00 \uc5c6\uc2b5\ub2c8\ub2e4.</i></div><br>";
1449 d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("\ubaa8\ub4e0 \uc54c\ub78c \uc81c\uac70","RemoveAllAlarms()")+AddButton("\ub354\ud558\ub2e4","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-nl.htm
+621 -618
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="nl" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Aansluiten onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Losgekoppeld</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Systeem status</a><p id=go14 class=nav1 onclick=go(14)><a>Extern bureaublad</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Bestanden</a><p id=go13 class=nav1 onclick=go(13)><a>Serieel via LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-informatie</a><p id=go6 class=nav1 onclick=go(6)><a>Logboek</a><p id=go15 class=nav1 onclick=go(15)><a>Auditlogboek</a><p id=go21 class=nav1 onclick=go(21)><a>Opslag</a><p id=go8 class=nav1 onclick=go(8)><a>Netwerkinstellingen</a><p id=go17 class=nav1 onclick=go(17)><a>Internetinstellingen</a><p id=go16 class=nav1 onclick=go(16)><a>Veiligheidsinstellingen</a><p id=go19 class=nav1 onclick=go(19)><a>Aanwezigheid van agent</a><p id=go18 class=nav1 onclick=go(18)><a>Systeemverdediging</a><p id=go11 class=nav1 onclick=go(11)><a>Gebruikersaccounts</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnementen</a><p id=go23 class=nav1 onclick=go(23)><a>Wekkeralarmen</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN-browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=Schijfkaart onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R-sessie" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blokken zijn 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blokken zijn 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>De firmware van deze computer moet worden bijgewerkt,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>kijk hier</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Bezig met laden...</h1></div><div id=p1 style=display:none><h1>Systeem status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-informatie</h1><span id=16></span></div><div id=p6 style=display:none><h1>Logboek</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netwerkinstellingen</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Gebruikersaccounts</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN-browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Vraag style=margin:4px onclick=wsmanQuery()><input type=button value=Doorzichtig style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serieel-over-LAN-terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of Serial-over-LAN-functie is uitgeschakeld<span id=26>, klik hier om het in te schakelen.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Aansluiten onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Losgekoppeld.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schakel in wat de Return-toets verzendt" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Schakel de grootte van de terminal in" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schakel het emulatietype van F1 naar F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Uitgebreide Ascii" title="Schakel het type terminalemulatie in" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Plakken disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Extern bureaublad</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of KVM-functie is uitgeschakeld<span id=37>, klik hier om het in te schakelen.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Draai naar links" onclick=drotate(-1)>↺</div><div class=rb title="Draai naar rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schakel de modus Volledig scherm" onkeypress="return false" onkeydown="return false" value=Vol onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Sla een schermafbeelding van het externe bureaublad op" onkeypress="return false" onkeydown="return false" value=Opslaan... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Instellingen ..." title="Bewerk instellingen voor extern bureaublad" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Wijzig de energiestatus van de externe machine" onkeypress="return false" onkeydown="return false" value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Aansluiten onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Losgekoppeld.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Winnen<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Links<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Leeg scherm&nbsp;</span><span id=47><input id=48 type=checkbox>Alleen bekijken&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Auditlogboek</h1><span id=50></span></div><div id=p16 style=display:none><h1>Veiligheidsinstellingen</h1><span id=51></span></div><div id=p17 style=display:none><h1>Internetinstellingen</h1><span id=52></span></div><div id=p18 style=display:none><h1>Systeemverdediging</h1><span id=53></span></div><div id=p19 style=display:none><h1>Aanwezigheid van agent</h1><span id=54></span></div><div id=p21 style=display:none><h1>Opslag</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event abonnementen</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wekkeralarmen</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Bestanden</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Omhoog>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecteer alles" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Hernoemen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Verwijderen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nieuwe map" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Uploaden onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Besnoeiing onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopiëren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Plakken onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Vernieuwen onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sorteren op naam<option value=2>Sorteer op maat<option value=3>Sorteren op datum<option value=4>Daal af op naam<option value=5>Daal af op maat<option value=6>Daal af op datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Gebruikersnaam</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Wachtwoord*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>bevestig wachtwoord</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokaal<option value=1>Netwerk<option value=2>Ieder</select><div>Toestemming</div></div><div>Verleende machtigingen</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Minimaal 8 tekens met hoofdletters, kleine letters, 0-9 en een van! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Krachtige actie</div></div><div><span style=color:red>Waarschuwing:</span>Sommige stroomacties kunnen leiden tot gegevensverlies en kunnen de omleidingssessies van het bureaublad, de terminal of de schijf verbreken.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Toestemmingscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primair beeldscherm<option value=1>Secundair beeldscherm<option id=d6ThirdDisplay value=2 style=display:none>Derde vertoning</select><div>Toestemming weergeven</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Beeldcodering</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Toon lokale muiscursor</label><br><label><input type=checkbox id=d7showcad>Toon Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Framesnelheid beperken</label><br><label><input type=checkbox id=d7noMouseRotate>Draai de muis niet</label><br></div><div>Andere instellingen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Kwaliteit</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Schalen</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=beheerder style=float:right;width:220px><div style=height:20px>Gebruikersnaam</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Wachtwoord</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Omleidingspoort</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Extern bureaublad</label><label style=display:block><input type=checkbox id=c17>IDE-omleiding<br></label><label style=display:block><input type=checkbox id=c18>Serieel via LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Niet verplicht<br></label><label><input type=radio name=d10 id=c20 value=1>Alleen vereist voor KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Altijd vereist<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">Profielnaam</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioriteit</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Verificatie</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Geen</select><div>Versleuteling</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">Wachtwoord*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">bevestig wachtwoord</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Hiermee wordt de volledige staat van Intel® AMT voor deze machine in het bestand opgeslagen. Wachtwoorden worden niet opgeslagen, maar er kunnen enkele gevoelige gegevens worden opgenomen.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Gehandicapt<br><input type=radio name=d20 id=d20b value=1>ICMP-reactie<br><input type=radio name=d20 id=d20c value=2>RMCP-reactie<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP-reactie<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Besturingssysteem IP-adres synchronisatie</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP adres</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetmarkering</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>poort</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primaire DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatieve DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Gehandicapt<option value=1>Uitgeschakeld, DHCP-update<option value=2>Ingeschakeld</select><div>Dynamische DNS-client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Interval bijwerken (minuten)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (seconden)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minuten, standaard TTL is 900 seconden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Opstarten<option value=10>Reset<option value=5>Power cyclus<option value=8>Stroomstoring<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS energiebesparing<option value=999>Stel opstartopties in</select><div>Afstandsbediening</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pauze</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Dwing Secure Boot af</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-instellingen</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forceer voortgangsgebeurtenissen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Aan / uit-knop vergrendelen</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-knop vergrendelen</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Slaapknop vergrendelen</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Toetsenbord vergrendelen</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-wachtwoord omzeilen</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Veilige modus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Gebruik IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serieel via LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Opstartinstellingen</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Geen<option id=ForceDVDBootOption value=1>Forceer CD / DVD Boot<option id=ForcePXEBootOption value=2>Forceer PXE Boot<option id=ForceHDBootOption value=3>Forceer harde schijf opstarten<option id=ForceDiagBootOption value=4>Forceer diagnostisch opstarten</select><div>Opstartbron</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Geen<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Start op naar floppy<option value=1>Start op naar CDROM</select><div>IDER opstartapparaat</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systeemfout<option id=c46 value=1>Rustig<option id=c47 value=2>Uitgebreid<option id=c48 value=3>Leeg scherm</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE-wachtwoord</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarmnaam</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Wekdatum (jaar-maand-dag)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Wektijd (uur: min: sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Interval (dagen-uren-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Houd alarm<option value=1>Na voltooiing verwijderen</select></div><div style=padding-top:4px>Na het ontwaken</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Ingeschakeld<br></label><label><input type=radio name=d26b id=c50 value=0>Gehandicapt<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Ingeschakeld<br></label><label><input type=radio name=d26a id=c52 value=0>Gehandicapt<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=annuleren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Verwijderen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="nl" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Aansluiten onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Losgekoppeld</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Systeem status</a><p id=go14 class=nav1 onclick=go(14)><a>Extern bureaublad</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Bestanden</a><p id=go13 class=nav1 onclick=go(13)><a>Serieel via LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware-informatie</a><p id=go6 class=nav1 onclick=go(6)><a>Logboek</a><p id=go15 class=nav1 onclick=go(15)><a>Auditlogboek</a><p id=go21 class=nav1 onclick=go(21)><a>Opslag</a><p id=go8 class=nav1 onclick=go(8)><a>Netwerkinstellingen</a><p id=go17 class=nav1 onclick=go(17)><a>Internetinstellingen</a><p id=go16 class=nav1 onclick=go(16)><a>Veiligheidsinstellingen</a><p id=go19 class=nav1 onclick=go(19)><a>Aanwezigheid van agent</a><p id=go18 class=nav1 onclick=go(18)><a>Systeemverdediging</a><p id=go11 class=nav1 onclick=go(11)><a>Gebruikersaccounts</a><p id=go22 class=nav1 onclick=go(22)><a>Abonnementen</a><p id=go23 class=nav1 onclick=go(23)><a>Wekkeralarmen</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN-browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=Schijfkaart onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R-sessie" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blokken zijn 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blokken zijn 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>De firmware van deze computer moet worden bijgewerkt,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>kijk hier</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Bezig met laden...</h1></div><div id=p1 style=display:none><h1>Systeem status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware-informatie</h1><span id=16></span></div><div id=p6 style=display:none><h1>Logboek</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Netwerkinstellingen</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Gebruikersaccounts</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN-browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Vraag style=margin:4px onclick=wsmanQuery()><input type=button value=Doorzichtig style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serieel-over-LAN-terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of Serial-over-LAN-functie is uitgeschakeld<span id=26>, klik hier om het in te schakelen.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Aansluiten onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Losgekoppeld.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Schakel in wat de Return-toets verzendt" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Schakel de grootte van de terminal in" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Schakel het emulatietype van F1 naar F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Uitgebreide Ascii" title="Schakel het type terminalemulatie in" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Plakken disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Extern bureaublad</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel® AMT Redirection-poort of KVM-functie is uitgeschakeld<span id=37>, klik hier om het in te schakelen.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>De externe computer is niet ingeschakeld, klik hier om een ​​aan / uit-commando te geven.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Draai naar links" onclick=drotate(-1)>↺</div><div class=rb title="Draai naar rechts" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Schakel de modus Volledig scherm" onkeypress="return false" onkeydown="return false" value=Vol onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Sla een schermafbeelding van het externe bureaublad op" onkeypress="return false" onkeydown="return false" value=Opslaan... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Instellingen ..." title="Bewerk instellingen voor extern bureaublad" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start bediening op afstand op schijf" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Wijzig de energiestatus van de externe machine" onkeypress="return false" onkeydown="return false" value="Stroomacties ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Aansluiten onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Losgekoppeld.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Winnen<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Win + Links<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Sturen onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Leeg scherm&nbsp;</span><span id=47><input id=48 type=checkbox>Alleen bekijken&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Auditlogboek</h1><span id=50></span></div><div id=p16 style=display:none><h1>Veiligheidsinstellingen</h1><span id=51></span></div><div id=p17 style=display:none><h1>Internetinstellingen</h1><span id=52></span></div><div id=p18 style=display:none><h1>Systeemverdediging</h1><span id=53></span></div><div id=p19 style=display:none><h1>Aanwezigheid van agent</h1><span id=54></span></div><div id=p21 style=display:none><h1>Opslag</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event abonnementen</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wekkeralarmen</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Bestanden</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Omhoog>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecteer alles" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Hernoemen onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Verwijderen onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nieuwe map" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Uploaden onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Besnoeiing onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Kopiëren onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Plakken onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Vernieuwen onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sorteren op naam<option value=2>Sorteer op maat<option value=3>Sorteren op datum<option value=4>Daal af op naam<option value=5>Daal af op maat<option value=6>Daal af op datum</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Gebruikersnaam</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Wachtwoord*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>bevestig wachtwoord</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Lokaal<option value=1>Netwerk<option value=2>Ieder</select><div>Toestemming</div></div><div>Verleende machtigingen</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Minimaal 8 tekens met hoofdletters, kleine letters, 0-9 en een van! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Krachtige actie</div></div><div><span style=color:red>Waarschuwing:</span>Sommige stroomacties kunnen leiden tot gegevensverlies en kunnen de omleidingssessies van het bureaublad, de terminal of de schijf verbreken.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Toestemmingscode</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primair beeldscherm<option value=1>Secundair beeldscherm<option id=d6ThirdDisplay value=2 style=display:none>Derde vertoning</select><div>Toestemming weergeven</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Beeldcodering</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Gehandicapt<option value=2>Automatic<option value=3>Ingeschakeld</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Toon lokale muiscursor</label><br><label><input type=checkbox id=d7showcad>Toon Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Framesnelheid beperken</label><br><label><input type=checkbox id=d7noMouseRotate>Draai de muis niet</label><br></div><div>Andere instellingen</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Kwaliteit</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Schalen</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=beheerder style=float:right;width:220px><div style=height:20px>Gebruikersnaam</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Wachtwoord</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Omleidingspoort</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Extern bureaublad</label><label style=display:block><input type=checkbox id=c17>IDE-omleiding<br></label><label style=display:block><input type=checkbox id=c18>Serieel via LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Niet verplicht<br></label><label><input type=radio name=d10 id=c20 value=1>Alleen vereist voor KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Altijd vereist<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">Profielnaam</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximaal 32 tekens"><div title="Maximaal 32 tekens">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioriteit</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Verificatie</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Geen</select><div>Versleuteling</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">Wachtwoord*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Lengte tussen 8 en 63 tekens"><div title="Lengte tussen 8 en 63 tekens">bevestig wachtwoord</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Hiermee wordt de volledige staat van Intel® AMT voor deze machine in het bestand opgeslagen. Wachtwoorden worden niet opgeslagen, maar er kunnen enkele gevoelige gegevens worden opgenomen.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Gehandicapt<br><input type=radio name=d20 id=d20b value=1>ICMP-reactie<br><input type=radio name=d20 id=d20c value=2>RMCP-reactie<br><input type=radio name=d20 id=d20d value=3>ICMP &amp; RMCP-reactie<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Besturingssysteem IP-adres synchronisatie</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP adres</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnetmarkering</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>poort</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primaire DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternatieve DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Gehandicapt<option value=1>Uitgeschakeld, DHCP-update<option value=2>Ingeschakeld</select><div>Dynamische DNS-client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Interval bijwerken (minuten)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (seconden)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minuten, standaard TTL is 900 seconden.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Opstarten<option value=10>Reset<option value=5>Power cyclus<option value=8>Stroomstoring<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS energiebesparing<option value=999>Stel opstartopties in</select><div>Afstandsbediening</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pauze</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Dwing Secure Boot af</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS-instellingen</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forceer voortgangsgebeurtenissen</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Aan / uit-knop vergrendelen</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Reset-knop vergrendelen</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Slaapknop vergrendelen</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Toetsenbord vergrendelen</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS-wachtwoord omzeilen</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Veilige modus</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Gebruik IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serieel via LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Opstartinstellingen</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Geen<option id=ForceDVDBootOption value=1>Forceer CD / DVD Boot<option id=ForcePXEBootOption value=2>Forceer PXE Boot<option id=ForceHDBootOption value=3>Forceer harde schijf opstarten<option id=ForceDiagBootOption value=4>Forceer diagnostisch opstarten</select><div>Opstartbron</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Geen<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Start op naar floppy<option value=1>Start op naar CDROM</select><div>IDER opstartapparaat</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Systeemfout<option id=c46 value=1>Rustig<option id=c47 value=2>Uitgebreid<option id=c48 value=3>Leeg scherm</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE-wachtwoord</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarmnaam</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Wekdatum (jaar-maand-dag)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Wektijd (uur: min: sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Interval (dagen-uren-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Houd alarm<option value=1>Na voltooiing verwijderen</select></div><div style=padding-top:4px>Na het ontwaken</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Ingeschakeld<br></label><label><input type=radio name=d26b id=c50 value=0>Gehandicapt<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Ingeschakeld<br></label><label><input type=radio name=d26a id=c52 value=0>Gehandicapt<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=annuleren style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Verwijderen style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,174 +12,175 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Onjuiste data";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Onjuiste data";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"Agent waakhond"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... veranderd in"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case inbraak";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Er is een externe Serial Over LAN-sessie tot stand gebracht.";if(1==c[2])return"Remote Serial Over LAN-sessie be\u00ebindigd. Gebruikerscontrole is hersteld.";if(2==c[2])return"Er is een externe IDE-omleidingssessie opgezet.";if(3==
93 +a&&170==c[0])return"Agent waakhond"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... veranderd in"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case inbraak";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Er is een externe Serial Over LAN-sessie tot stand gebracht.";if(1==c[2])return"Remote Serial Over LAN-sessie be\u00ebindigd. Gebruikerscontrole is hersteld.";if(2==c[2])return"Er is een externe IDE-omleidingssessie opgezet.";if(3==
94 c[2])return"Remote IDE-Redirection-sessie voltooid. Gebruikerscontrole is hersteld."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="bedrade"),4294967293==a?"Alle ontvangen pakketfilter is gematcht"+b+" koppel.":4294967292==a?"Alle uitgaande pakketfilters zijn gematcht"+b+" koppel.":4294967290==a?"Er werd op een vervalst pakketfilter gezocht"+b+" koppel.":"Filter"+a+" werd gematcht op"+b+" koppel.";if(192==a)return 0==c[2]?"Beveiligingsbeleid ingeroepen. Een deel van of al het netwerkverkeer (TX) is gestopt.":
95 2==c[2]?"Beveiligingsbeleid ingeroepen. Sommige of al het netwerkverkeer (RX) werd gestopt.":"Beveiligingsbeleid ingeroepen.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Gebruikersverzoek voor externe verbinding.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC-fout: probeer houding te krijgen terwijl NAC in Intel\ufffd AMT is uitgeschakeld.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA-fout: algemene fout"}return 6==a?"Verificatie mislukt"+(c[1]+(c[2]<<8))+" keer. Het systeem wordt mogelijk aangevallen.":
96 -30==a?"Geen opstartbare media":32==a?"Vergrendeling van besturingssysteem of stroomonderbreking":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Systeem opstartfout":37==a?"Systeemfirmware is gestart (ten minste \u00e9\u00e9n CPU wordt correct uitgevoerd).":"Onbekend sensortype #"+a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=
97 -window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator=
98 -"<i>Lokaal</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-standaardpoort</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=
99 -["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),
100 -b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},
101 -0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?
102 -(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?
103 -"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,
96 +30==a?"Geen opstartbare media":32==a?"Vergrendeling van besturingssysteem of stroomonderbreking":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Systeem opstartfout":37==a?"Systeemfirmware is gestart (ten minste \u00e9\u00e9n CPU wordt correct uitgevoerd).":"Onbekend sensortype #"+a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=
97 +window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator=
98 +"<i>Lokaal</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM-standaardpoort</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=
99 +["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),
100 +b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},
101 +0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?
102 +(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?
103 +"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,
104 '<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
108 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
110 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
111 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
112 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
113 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
115 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
116 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
118 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
120 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
121 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
122 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
123 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
125 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
127 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
128 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
130 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
133 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
134 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
135 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
137 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
138 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
139 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
142 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
143 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
144 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
145 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
148 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
149 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
150 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
105 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
108 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
110 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
111 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
112 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
113 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
115 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
116 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
118 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
120 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
121 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
122 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
123 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
125 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
127 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
128 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
130 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
133 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
134 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
135 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
137 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
138 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
139 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
140 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
142 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
143 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
144 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
145 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
148 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
149 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
150 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
152 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
153 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
154 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
155 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
156 -[a,b,[]])};var E="Niet gespecificeerd. ; Er is geen fysiek systeemgeheugen ge\u00efnstalleerd in het systeem. ; Geen bruikbaar systeemgeheugen, al het ge\u00efnstalleerde geheugen heeft een onherstelbare fout ervaren. ; Onherstelbare storing op de harde schijf / ATAPI / IDE-apparaat. ; Onherstelbare systeemkaartfout. ; Onherstelbare diskette subsysteemfout. ; Onherstelbare storing van harde schijfcontroller. ; Onherstelbare PS / 2- of USB-toetsenbordfout. ; Verwijderbare opstartmedia niet gevonden. ; Onherstelbare videocontrollerfout. ; Geen videoapparaat gedetecteerd. ; Firmware (BIOS) ROM-corruptie gedetecteerd. ; CPU-spanning komt niet overeen (processoren die dezelfde voeding delen hebben niet-overeenkomende spanningsvereisten) ; Fout bij het matchen van de CPU-snelheid".split(";"),
157 -m="Niet gespecificeerd. ; Geheugeninitialisatie. ; Initialisatie en test van harde schijf starten ; Secundaire processor (s) initialisatie ; Gebruikersauthenticatie ; Door gebruiker ge\u00efnitieerde systeemconfiguratie ; USB-bronconfiguratie ; PCI-bronconfiguratie ; Optie ROM-initialisatie ; Video-initialisatie ; Cache-initialisatie ; SM Businitialisatie ; Initialisatie toetsenbordcontroller ; Ge\u00efntegreerde controller / beheercontroller-initialisatie ; Dockingstation-bevestiging ; Dockingstation inschakelen ; Uitwerpen dockingstation ; Dockingstation uitschakelen ; Oproepvector voor besturingssysteem aanroepen ; Opstartproces voor besturingssysteem starten ; Initialisatie van moederbord of moederbord ; gereserveerd ; Floppy initialisatie ; Toetsenbordtest ; Testapparaat aanwijsapparaat ; Initialisatie van primaire processor".split(";"),
155 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
156 +[a,b,[]])};var D="Niet gespecificeerd. ; Er is geen fysiek systeemgeheugen ge\u00efnstalleerd in het systeem. ; Geen bruikbaar systeemgeheugen, al het ge\u00efnstalleerde geheugen heeft een onherstelbare fout ervaren. ; Onherstelbare storing op de harde schijf / ATAPI / IDE-apparaat. ; Onherstelbare systeemkaartfout. ; Onherstelbare diskette subsysteemfout. ; Onherstelbare storing van harde schijfcontroller. ; Onherstelbare PS / 2- of USB-toetsenbordfout. ; Verwijderbare opstartmedia niet gevonden. ; Onherstelbare videocontrollerfout. ; Geen videoapparaat gedetecteerd. ; Firmware (BIOS) ROM-corruptie gedetecteerd. ; CPU-spanning komt niet overeen (processoren die dezelfde voeding delen hebben niet-overeenkomende spanningsvereisten) ; Fout bij het matchen van de CPU-snelheid".split(";"),
157 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
158 k="Niet gespecificeerd ; Overige ; Onbekend ; Processor ; Schijf ; Randapparatuur ; Systeembeheermodule ; Moederbord ; Geheugenmodule ; Processormodule ; Voeding ; Insteekkaart ; Voorpaneelbord ; Achterpaneelbord ; Voedingssysteembord ; Schijfbackplane ; Interne systeemuitbreiding kaart ; Andere moederbord ; Processor board ; Power unit ; Power module ; Power management board ; Chassis achterpaneel board ; Systeem chassis ; Sub chassis ; Andere chassis board ; Disk drive bay ; Perifere bay ; Device bay ; Ventilator koeling ; Koeleenheid ; Kabelverbinding ; Geheugenapparaat ; Systeembeheersoftware ; BIOS ; Intel (r) ME ; Systeembus ; Groep ; Intel (r) ME ; Externe omgeving ; Batterij ; Verwerkingsblad ; Connectiviteitsschakelaar ; Processor / geheugenmodule ; I / O-module ; Processor I / O-module ; Beheercontrollerfirmware ; IPMI-kanaal ; PCI-bus ; PCI-expressbus ; SCSI-bus ; SATA / SAS-bus ; Processor voorkant bus".split(";");
159 -h.RealmNames=";; Redirection ;; Hardware Asset ; Remote Control ; Storage ; Event Manager ; Storage Admin ; Agent Presence Local ; Agent Presence Remote ; Circuit Breaker ; Network Time ; General Information ; Firmware Update ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Beheerder ; Gebeurtenislogboeklezer ; Auditlogboek ; ACL-domein ;;; Lokaal systeem".split(";");h.WatchdogCurrentStates={1:"Niet begonnen",2:"Gestopt",4:"Rennen",8:"Niet meer geldig",16:"Geschorst"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
160 -u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"Beveiligingsbeheerder",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Beveiligingsauditlogboek",21:"Netwerktijd",22:"Netwerk administratie",23:"Opslagbeheer",24:"Event Manager",25:"Circuit Breaker Manager",
159 +g.RealmNames=";; Redirection ;; Hardware Asset ; Remote Control ; Storage ; Event Manager ; Storage Admin ; Agent Presence Local ; Agent Presence Remote ; Circuit Breaker ; Network Time ; General Information ; Firmware Update ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Beheerder ; Gebeurtenislogboeklezer ; Auditlogboek ; ACL-domein ;;; Lokaal systeem".split(";");g.WatchdogCurrentStates={1:"Niet begonnen",2:"Gestopt",4:"Rennen",8:"Niet meer geldig",16:"Geschorst"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
160 +u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"Beveiligingsbeheerder",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Beveiligingsauditlogboek",21:"Netwerktijd",22:"Netwerk administratie",23:"Opslagbeheer",24:"Event Manager",25:"Circuit Breaker Manager",
161 26:"Agent Presence Manager",27:"Draadloze configuratie",28:"EAC",29:"KVM",30:"Gebruikersaanmeldingsgebeurtenissen",32:"Scherm leegmaken",33:"Watchdog-evenementen",1600:"Bevoorrading gestart",1601:"Provisioning voltooid",1602:"ACL-vermelding toegevoegd",1603:"ACL-vermelding gewijzigd",1604:"ACL-vermelding verwijderd",1605:"ACL-toegang met ongeldige referenties",1606:"ACL-status van binnenkomst",1607:"TLS-status gewijzigd",1608:"TLS-servercertificaatset",1609:"TLS-servercertificaat verwijderen",1610:"TLS Trusted Root Certificate toegevoegd",
162 -1611:"TLS Trusted Root Certificate verwijderd",1612:"TLS vooraf gedeelde sleutelset",1613:"Kerberos-instellingen gewijzigd",1614:"Kerberos hoofdsleutel gewijzigd",1615:"Flash Versleten tellers Reset",1616:"Power Package gewijzigd",1617:"Stel Realm Authentication Mode in",1618:"Upgrade Client naar Admin Control Mode",1619:"Unprovisioning Begonnen",1700:"Power Up uitgevoerd",1701:"Uitschakelen uitgevoerd",1702:"Power Cycle uitgevoerd",1703:"Reset uitgevoerd",1704:"Stel opstartopties in",1800:"IDER-sessie geopend",
163 -1801:"IDER-sessie gesloten",1802:"IDER ingeschakeld",1803:"IDER uitgeschakeld",1804:"SoL-sessie geopend",1805:"SoL-sessie gesloten",1806:"SoL ingeschakeld",1807:"SoL uitgeschakeld",1808:"KVM-sessie gestart",1809:"KVM-sessie be\u00ebindigd",1810:"KVM ingeschakeld",1811:"KVM uitgeschakeld",1812:"VNC-wachtwoord 3 keer mislukt",1900:"Firmware bijgewerkt",1901:"Firmware-update mislukt",2E3:"Beveiligingsauditlogboek gewist",2001:"Beveiligingsauditbeleid gewijzigd",2002:"Beveiligingsauditlogboek uitgeschakeld",
164 -2003:"Beveiligingsauditlogboek ingeschakeld",2004:"Beveiligingsauditlogboek ge\u00ebxporteerd",2005:"Beveiligingsauditlogboek hersteld",2100:"Intel&reg; ME Time Set",2200:"TCPIP-parameters ingesteld",2201:"Hostnaam ingesteld",2202:"Domeinnaam ingesteld",2203:"VLAN-parameterset",2204:"Linkbeleid instellen",2205:"IPv6-parameters ingesteld",2300:"Global Storage Attributes Set",2301:"Opslag EACL gewijzigd",2302:"Opslag FPACL gewijzigd",2303:"Opslag schrijven",2400:"Waarschuwing geabonneerd",2401:"Melding afgemeld",
165 -2402:"Gebeurtenislogboek gewist",2403:"Gebeurtenislogboek bevroren",2500:"CB-filter toegevoegd",2501:"CB-filter verwijderd",2502:"CB-beleid toegevoegd",2503:"CB-beleid verwijderd",2504:"CB Standaardbeleid ingesteld",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog toegevoegd",2601:"Agent Watchdog verwijderd",2602:"Agent Watchdog-actieset",2700:"Draadloos profiel toegevoegd",2701:"Draadloos profiel verwijderd",2702:"Draadloos profiel bijgewerkt",2800:"EAC Posture Signer SET",
166 -2801:"EAC ingeschakeld",2802:"EAC uitgeschakeld",2803:"EAC Posture State",2804:"EAC-opties instellen",2900:"KVM-aanmelding ingeschakeld",2901:"KVM-aanmelding uitgeschakeld",2902:"KVM-wachtwoord gewijzigd",2903:"KVM-toestemming geslaagd",2904:"KVM-toestemming mislukt",3E3:"Opt-in beleidswijziging",3001:"Toestemmingscode-gebeurtenis verzenden",3002:"Start opt-in geblokkeerde gebeurtenis"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));
167 -if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Ongeldige ME-toegang","Ongeldige MEBx-toegang"][b.charCodeAt(0)];if(1606==a){var c=["Gehandicapt","Ingeschakeld"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Afgelegen"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokaal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Gehandicapt"][b.charCodeAt(4)]:1619==a?
168 -["BIOS","MEBx","Lokale MEI","Lokale WSMAN","Externe WSAMN"][b.charCodeAt(0)]:1900==a?"Van"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" naar"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Van"+["Geen","KVM","Allemaal"][b.charCodeAt(0)]+" naar"+["Geen","KVM","Allemaal"][b.charCodeAt(1)]:3001==a?["Succes","3 keer mislukt"][b.charCodeAt(0)]:
169 -null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
162 +1611:"TLS Trusted Root Certificate verwijderd",1612:"TLS vooraf gedeelde sleutelset",1613:"Kerberos-instellingen gewijzigd",1614:"Kerberos hoofdsleutel gewijzigd",1615:"Flash Versleten tellers Reset",1616:"Power Package gewijzigd",1617:"Stel Realm Authentication Mode in",1618:"Upgrade Client naar Admin Control Mode",1619:"Unprovisioning Begonnen",1700:"Power Up uitgevoerd",1701:"Uitschakelen uitgevoerd",1702:"Power Cycle uitgevoerd",1703:"Reset uitgevoerd",1704:"Stel opstartopties in",1705:"Remote graceful power down initiated",
163 +1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"IDER-sessie geopend",1801:"IDER-sessie gesloten",1802:"IDER ingeschakeld",1803:"IDER uitgeschakeld",1804:"SoL-sessie geopend",1805:"SoL-sessie gesloten",1806:"SoL ingeschakeld",1807:"SoL uitgeschakeld",1808:"KVM-sessie gestart",1809:"KVM-sessie be\u00ebindigd",1810:"KVM ingeschakeld",1811:"KVM uitgeschakeld",1812:"VNC-wachtwoord 3 keer mislukt",1900:"Firmware bijgewerkt",
164 +1901:"Firmware-update mislukt",2E3:"Beveiligingsauditlogboek gewist",2001:"Beveiligingsauditbeleid gewijzigd",2002:"Beveiligingsauditlogboek uitgeschakeld",2003:"Beveiligingsauditlogboek ingeschakeld",2004:"Beveiligingsauditlogboek ge\u00ebxporteerd",2005:"Beveiligingsauditlogboek hersteld",2100:"Intel&reg; ME Time Set",2200:"TCPIP-parameters ingesteld",2201:"Hostnaam ingesteld",2202:"Domeinnaam ingesteld",2203:"VLAN-parameterset",2204:"Linkbeleid instellen",2205:"IPv6-parameters ingesteld",2300:"Global Storage Attributes Set",
165 +2301:"Opslag EACL gewijzigd",2302:"Opslag FPACL gewijzigd",2303:"Opslag schrijven",2400:"Waarschuwing geabonneerd",2401:"Melding afgemeld",2402:"Gebeurtenislogboek gewist",2403:"Gebeurtenislogboek bevroren",2500:"CB-filter toegevoegd",2501:"CB-filter verwijderd",2502:"CB-beleid toegevoegd",2503:"CB-beleid verwijderd",2504:"CB Standaardbeleid ingesteld",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog toegevoegd",2601:"Agent Watchdog verwijderd",2602:"Agent Watchdog-actieset",
166 +2700:"Draadloos profiel toegevoegd",2701:"Draadloos profiel verwijderd",2702:"Draadloos profiel bijgewerkt",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC ingeschakeld",2802:"EAC uitgeschakeld",2803:"EAC Posture State",2804:"EAC-opties instellen",2900:"KVM-aanmelding ingeschakeld",2901:"KVM-aanmelding uitgeschakeld",2902:"KVM-wachtwoord gewijzigd",
167 +2903:"KVM-toestemming geslaagd",2904:"KVM-toestemming mislukt",3E3:"Opt-in beleidswijziging",3001:"Toestemmingscode-gebeurtenis verzenden",3002:"Start opt-in geblokkeerde gebeurtenis",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?
168 +b.substring(3):null;if(1605==a)return["Ongeldige ME-toegang","Ongeldige MEBx-toegang"][b.charCodeAt(0)];if(1606==a){var c=["Gehandicapt","Ingeschakeld"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Afgelegen"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Lokaal"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Gehandicapt"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Lokale MEI","Lokale WSMAN",
169 +"Externe WSAMN"][b.charCodeAt(0)]:1900==a?"Van"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" naar"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"Van"+["Geen","KVM","Allemaal"][b.charCodeAt(0)]+" naar"+["Geen","KVM","Allemaal"][b.charCodeAt(1)]:3001==a?["Succes","3 keer mislukt"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,
170 +p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
171 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
172 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
173 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
174 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
174 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
175 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
176 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
177 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
178 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
179 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
180 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
181 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
182 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
175 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
176 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
177 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
178 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
179 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
180 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
181 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
182 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
183 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
184 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
185 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
186 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -190,10 +191,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
191 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
192 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
193 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
193 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
194 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
195 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
195 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
196 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
196 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
197 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
198 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
199 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
200 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -203,69 +204,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
204 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
205 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
206 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
206 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
207 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
208 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
209 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
210 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
211 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
212 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
213 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
207 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
208 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
209 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
210 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
211 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
212 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
213 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
214 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
215 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
215 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
216 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
217 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
218 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
219 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
220 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
221 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
222 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
223 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
224 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
225 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
226 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
227 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
228 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
216 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
217 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
218 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
219 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
220 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
221 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
222 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
223 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
224 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
225 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
226 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
227 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
228 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
229 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
230 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
231 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
232 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
233 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
233 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
234 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
235 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
234 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
235 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
236 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
237 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
238 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
239 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
240 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
241 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
241 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
242 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
243 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
244 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
245 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
246 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
247 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
248 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
242 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
243 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
244 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
245 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
246 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
247 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
248 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
249 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
250 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
251 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
252 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
252 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
253 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
254 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
255 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
256 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
257 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
258 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
259 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
260 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
261 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
262 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
263 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
264 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
253 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
254 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
255 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
256 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
257 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
258 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
259 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
260 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
261 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
262 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
263 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
264 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
265 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
266 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
266 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
267 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
268 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
267 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
268 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
269 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
270 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
271 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
272 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -279,213 +280,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
280 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
281 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
282 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
282 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
283 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
284 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
284 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
285 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
286 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
287 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
288 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
289 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
290 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
291 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
285 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
286 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
287 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
288 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
289 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
290 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
291 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
292 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
293 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
293 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
294 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
295 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
294 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
295 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
296 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
297 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
298 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
298 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
299 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
300 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
300 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
301 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
302 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
302 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
303 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
304 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
305 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
306 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
307 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
308 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
309 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
310 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
311 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
312 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
313 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
314 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
303 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
304 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
305 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
306 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
307 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
308 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
309 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
310 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
311 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
312 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
313 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
314 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
315 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
316 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
316 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
317 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
318 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
319 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
320 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
321 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
322 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
323 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
324 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
317 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
318 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
319 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
320 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
321 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
322 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
323 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
324 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
325 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
326 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
327 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
328 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
329 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
330 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
331 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
331 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
332 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
333 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
334 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
335 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
336 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
332 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
333 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
334 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
335 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
336 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
337 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
338 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
338 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
339 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
340 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
340 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
341 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
342 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
343 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
344 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
345 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
346 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
347 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
348 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
349 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
341 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
342 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
343 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
344 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
345 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
346 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
347 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
348 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
349 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
350 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
351 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
351 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
352 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
353 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
354 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
355 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
352 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
353 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
354 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
355 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
356 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
357 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
358 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
359 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
359 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
360 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
361 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
362 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
363 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
363 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
364 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
365 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
366 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
367 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
368 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
369 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
364 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
365 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
366 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
367 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
368 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
369 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
370 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
371 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
371 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
372 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
373 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
374 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
375 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
372 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
373 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
374 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
375 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
376 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
377 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
377 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
378 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
379 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
380 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
380 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
381 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
381 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
382 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
383 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
384 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
384 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
385 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
386 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
387 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
385 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
386 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
387 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
388 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
389 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
389 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
390 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
391 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
392 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
390 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
391 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
392 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
393 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
394 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
395 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
396 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
396 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
397 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
398 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
399 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
400 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
401 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
402 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
403 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
404 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
405 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
406 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
407 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
397 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
398 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
399 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
400 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
401 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
402 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
403 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
404 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
405 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
406 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
407 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
408 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
409 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
409 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
410 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
411 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
410 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
411 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
412 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
413 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
413 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
414 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
415 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
416 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
417 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
414 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
415 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
416 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
417 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
418 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
419 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
419 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
420 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
421 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
421 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
422 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
423 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
422 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
423 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
424 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
425 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
425 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
426 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
427 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
428 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
429 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
430 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
431 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
432 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
433 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
434 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
435 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
436 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
437 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
438 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
439 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
440 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
441 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
442 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
443 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
426 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
427 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
428 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
429 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
430 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
431 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
432 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
433 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
434 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
435 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
436 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
437 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
438 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
439 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
440 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
441 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
442 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
443 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
444 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
445 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
445 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
446 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
447 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
447 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
448 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
449 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
450 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
450 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
451 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
452 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
453 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
454 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
455 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
456 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
457 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
458 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
459 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
460 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
461 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
462 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
463 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
464 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
465 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
466 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
451 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
452 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
453 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
454 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
455 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
456 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
457 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
458 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
459 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
460 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
461 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
462 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
463 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
464 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
465 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
466 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
467 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
468 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
469 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
470 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
470 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
471 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
472 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
471 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
472 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
473 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
474 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
474 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
475 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
476 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
477 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
478 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
479 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
480 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
481 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
481 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
482 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
483 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
484 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
482 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
483 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
484 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
485 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
486 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
486 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
487 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
488 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
487 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
488 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
489 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
490 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
491 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
492 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -503,111 +504,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
504 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
505 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
506 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
506 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
507 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
508 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
509 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
507 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
508 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
509 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
510 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
511 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
511 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
512 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
513 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
514 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
515 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
512 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
513 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
514 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
515 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
516 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
517 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
517 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
518 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
519 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
520 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
521 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
521 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
522 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
522 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
523 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
524 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
525 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
526 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
526 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
527 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
528 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
529 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
530 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
531 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
532 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
533 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
533 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
534 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
535 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
535 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
536 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
537 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
538 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
539 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
540 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
541 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
542 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
536 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
537 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
538 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
539 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
540 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
541 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
542 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
543 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
544 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
545 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
545 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
546 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
547 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
547 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
548 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
549 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
549 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
550 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
551 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
552 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
553 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
554 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
555 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
556 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
550 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
551 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
552 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
553 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
554 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
555 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
556 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
557 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
558 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
559 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
559 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
560 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
561 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
562 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
563 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
560 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
561 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
562 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
563 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
564 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
565 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
565 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
566 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
567 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
568 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
569 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
570 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
571 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
572 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
573 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
574 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
575 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
576 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
577 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
578 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
579 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
580 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
566 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
567 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
568 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
569 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
570 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
571 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
572 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
573 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
574 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
575 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
576 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
577 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
578 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
579 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
580 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
581 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
582 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
582 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
583 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
584 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
585 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
586 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
587 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
583 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
584 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
585 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
586 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
587 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
588 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
589 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
590 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
590 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
591 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
591 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
592 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
593 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
593 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
594 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
595 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
595 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
596 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
597 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
598 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
599 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
600 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
596 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
597 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
598 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
599 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
600 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
601 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
602 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
602 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
603 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
604 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
603 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
604 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
605 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
606 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
607 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
608 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
609 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
610 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
610 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
611 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
612 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
613 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
614 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -618,20 +619,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
619 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
620 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
621 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
621 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
622 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
622 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
623 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
624 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
624 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
625 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
625 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
626 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
627 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
628 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
628 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
629 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
630 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
631 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
632 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
633 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
633 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
634 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
634 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
635 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
636 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
637 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
638 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -640,20 +641,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
641 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
642 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
643 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
643 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
644 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
645 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
646 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
647 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
648 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
648 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
649 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
650 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
651 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
652 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
653 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
649 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
650 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
651 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
652 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
653 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
654 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
655 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
655 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
656 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
656 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
657 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
658 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
659 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
660 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -677,17 +678,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
678 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
679 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
680 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
680 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
681 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
682 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
683 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
681 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
682 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
683 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
684 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
685 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
686 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
687 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
688 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
689 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
689 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
690 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
690 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
691 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
692 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
693 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
694 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -703,48 +704,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
704 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
705 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
706 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
706 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
707 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
708 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
709 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
710 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
711 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
712 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
713 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
713 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
714 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
715 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
716 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
717 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
717 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
718 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
719 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
719 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
720 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
721 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
722 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
722 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
723 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
724 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
725 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
726 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
727 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
727 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
728 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
729 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
730 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
728 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
729 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
730 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
731 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
732 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
733 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
734 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
735 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
736 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
736 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
737 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
738 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
738 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
739 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
740 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
739 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
740 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
741 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
742 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
743 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
744 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
744 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
745 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
746 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
746 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
747 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
747 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
748 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
749 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
750 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
751 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -752,119 +753,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
753 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
754 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
755 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
755 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
756 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
757 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
758 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
759 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
760 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
761 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
762 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
763 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
764 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
765 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
766 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
767 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
768 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
769 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
770 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
771 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
772 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
773 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
774 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
775 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
776 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
777 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
778 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
779 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
780 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
781 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
782 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
783 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
784 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
785 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
786 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
787 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
788 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
789 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
790 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
791 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
792 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
793 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
794 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
795 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
796 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
797 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
798 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
799 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
800 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
801 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
802 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
803 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
804 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
805 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
806 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
807 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
808 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
809 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
810 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
811 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
812 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
813 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
814 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
815 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
816 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
817 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
818 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
819 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
820 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
821 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
822 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
823 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
824 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
825 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
826 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
827 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
828 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
829 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
830 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
831 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
832 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
833 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
834 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
835 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
836 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
837 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
838 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
839 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
840 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
841 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
842 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
843 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
844 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
845 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
846 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
847 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
848 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
849 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
756 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
757 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
758 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
759 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
760 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
761 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
762 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
763 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
764 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
765 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
766 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
767 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
768 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
769 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
770 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
771 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
772 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
773 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
774 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
775 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
776 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
777 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
778 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
779 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
780 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
781 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
782 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
783 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
784 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
785 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
786 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
787 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
788 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
789 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
790 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
791 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
792 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
793 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
794 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
795 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
796 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
797 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
798 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
799 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
800 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
801 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
802 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
803 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
804 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
805 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
806 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
807 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
808 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
809 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
810 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
811 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
812 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
813 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
814 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
815 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
816 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
817 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
818 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
819 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
820 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
821 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
822 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
823 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
824 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
825 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
826 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
827 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
828 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
829 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
830 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
831 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
832 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
833 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
834 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
835 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
836 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
837 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
838 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
839 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
840 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
841 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
842 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
843 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
844 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
845 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
846 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
847 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
848 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
849 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
850 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
851 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
852 +l.Init();return l},ZLIB=ZLIB||{};
853 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
854 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
852 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
853 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
854 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
855 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
856 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
857 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
858 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
856 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
857 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
859 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
860 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
861 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
862 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
860 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
861 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
862 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
863 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
863 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
864 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
865 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
866 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
867 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
868 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
866 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
867 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
869 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
870 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
871 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
872 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
873 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -886,22 +889,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
889 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
890 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
891 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
889 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
890 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
891 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
892 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
893 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
892 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
893 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
894 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
895 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
896 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
897 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
898 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
899 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
900 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
901 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
899 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
900 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
902 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
903 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
904 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
902 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
903 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
904 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
905 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
906 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
907 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
908 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
909 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
910 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -917,16 +920,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
920 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
921 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
922 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
920 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
921 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
922 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
923 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
924 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
925 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
926 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
923 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
924 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
925 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
926 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
927 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
928 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
929 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
930 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
928 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
929 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Bezig met laden...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
931 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
932 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Bezig met laden...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
933 StatusStrs=["Losgekoppeld","Verbinden...","Opstelling...","Verbonden"],t,t2,rsepass=null;
934 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
935 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -959,14 +962,14 @@ function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTim
962 function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Onbekend</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Zet aan"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
963 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Ingeplugd",", Op batterij"][v.PowerSource]);d+=TableEntry("Kracht",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Geen</i>":EscapeHtml(c);d+=TableEntry("Naam & domein",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=
964 TableEntry("Systeem-ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("Systeem-ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" geactiveerd in Admin Control Mode (ACM)",4==l.ProvisioningMode&&(n=" geactiveerd in Client Control Mode (CCM)",b=9));d+=TableEntry("Intel&reg; ME","v"+
962 -getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
963 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
964 -p&&(e+=", Omleidingspoort");q&&(e+=", Serieel via LAN");n&&(e+=", IDE-omleiding");h&&(e+=", KVM");""==e&&(e=" Geen");d+=TableEntry("Actieve functies",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Primair beeldscherm",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Primair beeldscherm","Secundair beeldscherm",
965 +getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
966 +p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
967 +q&&(e+=", Omleidingspoort");p&&(e+=", Serieel via LAN");n&&(e+=", IDE-omleiding");g&&(e+=", KVM");""==e&&(e=" Geen");d+=TableEntry("Actieve functies",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Primair beeldscherm",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Primair beeldscherm","Secundair beeldscherm",
968 "3e scherm"][n.DefaultScreen]),e='<span title="'+format("De standaard externe weergave is {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Poort 5900 ingeschakeld"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"seconden opt-in":"tweede opt-in")),e+=","+n.SessionTimeout+" minuut"+(0<n.SessionTimeout?"s":"")+" sessie-time-out",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&
966 -1))&&(e+=", Blanking toegestaan"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Extern bureaublad",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Onbekende staat",p=amtsysstate.IPS_OptInService.response.OptInRequired,
967 -0==p&&(e="Niet verplicht"),1==p&&(e="Alleen vereist voor KVM"),4294967295==p&&(e="Altijd vereist"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Toestemming van de gebruiker",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Onbekend",1:"Andere",2:"Ingeschakeld",3:"Gehandicapt",4:"Afsluiten",5:"Niet toepasbaar",6:"Ingeschakeld maar offline",
969 +1))&&(e+=", Blanking toegestaan"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Extern bureaublad",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Onbekende staat",q=amtsysstate.IPS_OptInService.response.OptInRequired,
970 +0==q&&(e="Niet verplicht"),1==q&&(e="Alleen vereist voor KVM"),4294967295==q&&(e="Altijd vereist"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Toestemming van de gebruiker",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Onbekend",1:"Andere",2:"Ingeschakeld",3:"Gehandicapt",4:"Afsluiten",5:"Niet toepasbaar",6:"Ingeschakeld maar offline",
971 7:"In Test",8:"Uitgesteld",9:"Rustig",10:"Beginnend",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Onbekend",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=
969 -amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Energiebeleid",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',
972 +amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("Energiebeleid",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',
973 xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Datum Tijd",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Stroomacties ...","showPowerActionDlg()")+" ";e+=AddButton("Staat opslaan ...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
974 QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Het wijzigen van netwerkinstellingen kan ertoe leiden dat deze pagina niet meer beschikbaar is.");d=d+"<br><h2>Algemene instellingen</h2>"+TableStart();e="";"<i>Geen</i>"!=c&&(1==v.SharedFQDN&&(e=", gedeeld met OS"),0==v.SharedFQDN&&(e=", verschillend van OS"));d+=TableEntry("Naam & domein",addLinkConditional(c+e,"showEditNameDlg(1)",
975 xxAccountAdminName));c="Gehandicapt";1==v.DDNSUpdateEnabled?c="Elk ingeschakeld"+v.DDNSPeriodicUpdateInterval+" minuten, TTL is"+v.DDNSTTL+" minuten":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Update door DHCP-server");d+=TableEntry("Dynamische DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==
@@ -975,8 +978,8 @@ addLinkConditional(0==e.length?"Niet beschikbaar":"Beschikbaar in: "+e.join(", "
978 ", SSID: "+(s?s:"<i>Geen</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Ingeschakeld":"Gehandicapt","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&
979 1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Ingeschakeld":"Gehandicapt","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Reageer op ping",
980 addLinkConditional(["Gehandicapt","ICMP-reactie","RMCP-reactie","ICMP & RMCP-reactie"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Automatisch met DHCP-server":"Statisch IP-adres",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4-status",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4-adres",isIpAddress(c.IPAddress,"Geen"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4-gateway / masker",
978 -c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Geen")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4-domeinnaamserver",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Gehandicapt",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);
979 -1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Ingeschakelde, automatische en handmatige adressen":"Ingeschakeld, automatische adressen");d+=TableEntry("IPv6-status",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&
981 +c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Geen")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4-domeinnaamserver",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="Gehandicapt",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);
982 +1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Ingeschakelde, automatische en handmatige adressen":"Ingeschakeld, automatische adressen");d+=TableEntry("IPv6-status",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&
983 (ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6-adres",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6-adres","Geen");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 standaardrouter",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6-domeinnaamserver",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&
984 0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
985 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
@@ -1024,8 +1027,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1027 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Gehandicapt":"Ingeschakeld",c&2&&(b+=", Op slot"),c&4&&(b+=", Bijna vol"),c&8&&(b+=", Vol"),c&16&&(b+=", Geen sleutel"),c="<h1>Instellingen auditlogboek</h1>"+TableStart(),c+=TableEntry("Staat",b),c+=TableEntry("Opslag",a[0].CurrentNumberOfRecords+" record (s),"+a[0].PercentageFree+"% vrij"),c+=TableEntry("Overschrijf beleid",2==a[0].OverwritePolicy?"Verpakt wanneer vol":"Overschrijft nooit"),c+=TableEnd(),QH(49,
1028 c),amtstack.GetAuditLog(processAuditLog1))}
1029 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Opslaan...","SaveAuditLog()")+AddButton("Logboek opschonen","ClearAuditLog()"))+"<br>");if(0==c.length)d="Geen controlelogboekgebeurtenissen gevonden.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tijd</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";
1027 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1028 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT-auditlogboek",auditLog)}
1030 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1031 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT-auditlogboek",auditLog)}
1032 function ClearAuditLog(b){QH(60,"Auditlogboek wissen?");setDialogMode(1,"Auditlogboek",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1033 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Auditlogboek","Fout: "+d)}
1034 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tijd",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiator",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Adres",a.NetAddress));d+=addHtmlValue("Toepassing",a.AuditApp);d+=addHtmlValue("Evenement",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Uitgebreide gegevens",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&
@@ -1075,7 +1078,7 @@ function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabi
1078 "PolicyConditionName",a),b=getItem(xxWatchdog.AMT_AgentPresenceWatchdogAction.responses,"PolicyActionName",b),a.actions||(a.actions=[]),a.actions.push(b));updateWatchdog();QV("go19",!0)}}var watchdogEnabledStates="Onbekend;Andere;Ingeschakeld;Gehandicapt;Afsluiten;Niet toepasbaar;Ingeschakeld maar offline;In Test;Uitgesteld;Rustig;Beginnend".split(";"),watchdogMonitoredEntity="Onbekend;Andere;Besturingssysteem;Besturingssysteem opstartproces;Besturingssysteem afsluiten;Firmware-opstartproces;BIOS-opstartproces;Toepassing;Serviceprocessor".split(";");
1079 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("Maximale waakhonden",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" waakhonden");b+=TableEntry("Maximaal totaal aantal acties",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" acties");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-agentwaakhonden.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1080 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Geen waakhond voor aanwezigheid van agenten gevonden.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Actie toevoegen ..." onclick=addWatchdogAction(event,'+
1078 -c+")>";a.transitions&&(b+='<input type=button style=float:right value="Acties verwijderen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=": Te loggen gebeurtenis")}""!=d&&(b+="<div style=padding:12px>"+
1081 +c+")>";a.transitions&&(b+='<input type=button style=float:right value="Acties verwijderen ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Te loggen gebeurtenis")}""!=d&&(b+="<div style=padding:12px>"+
1082 d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Watchdog toevoegen ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"Elke staat";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1083 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Omschrijving",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Gecontroleerde entiteit",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Huidige toestand",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Ingeschakelde staat",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Opstartinterval",
1084 b.StartupInterval+" seconde (n)");c+=addHtmlValue("Time-outinterval",b.TimeoutInterval+" seconde (n)");setDialogMode(11,format("Waakhond {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1169,7 +1172,7 @@ v&&(n+="Gehandicapt,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Rijke
1172 "newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1173 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Bewerk account",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1174 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nieuw account",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1172 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Accountfout","Ongeldige parameters");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1175 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Accountfout","Ongeldige parameters");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1176 l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1177 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Beheerder</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1178 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Alleen lokaal","Alleen netwerk","Alles (lokaal en netwerk)"];
@@ -1187,8 +1190,8 @@ c3.value="Start Capture"}}function terminal_FileSelectHandler(b){haltEvent(b);if
1190 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1191 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1192 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1190 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1191 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1193 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1194 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1195 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("Datakanaal",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1196 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1197 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1199,14 +1202,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1202 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1203 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1204 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Aansluiten":"verbinding verbreken";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Extern bureaublad","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Extern bureaublad","The device indicated that this type of connection of not supported."):
1202 -5E4==b.disconnectCode?messagebox("Extern bureaublad","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1203 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Instellingen voor extern bureaublad",3,showDesktopSettingsChanged))}
1205 +5E4==b.disconnectCode?messagebox("Extern bureaublad","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Extern bureaublad","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1206 +break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1207 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Instellingen voor extern bureaublad",3,showDesktopSettingsChanged))}
1208 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1209 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1206 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1207 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1208 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1209 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1210 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1211 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1212 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1213 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1214 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1215 "8px"),center()))}function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Externe toetsenbordinvoer",3,showDeskTypeEx,'<div>Voer tekst in en klik op OK om deze op afstand te typen met een Amerikaans Engels toetsenbord. Zorg ervoor dat u de externe cursor op de juiste positie plaatst voordat u doorgaat.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1216 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
@@ -1216,13 +1220,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1220 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1221 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1222 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1219 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1223 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1224 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1225 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1226 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1223 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wortel</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1224 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1225 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1227 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Wortel</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1228 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1229 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1230 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1231 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1232 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1342,10 +1346,9 @@ b&1&&addOption("d5actionSelect","Reset naar IDE-R Floppy",200);b&2&&addOption("d
1346 "Krachtige acties",3,powerActionDlgCheck)}else messagebox("Krachtige actie",format("Kan systeemmogelijkheden niet krijgen, fout {0}",d))}
1347 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"Krachtactie voltooid."):QH(60,format("Power action error # {0}.",e));setDialogMode(1,"Krachtige actie",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Uitvoering van Intel&reg; Remote Secure Erase bevestigen?<br>Voer indien nodig Secure Erase-wachtwoord in.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Wachtwoord</div></div><br><div style=color:red><b> WAARSCHUWING: </b> Hierdoor worden gegevens op het externe systeem gewist.</div>",
1348 rsepass=1,setDialogMode(11,"Krachtige acties",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1345 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WAARSCHUWING: </b> Hierdoor worden gegevens op het externe systeem gewist.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1346 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1347 -a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Krachtige acties",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1348 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1349 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> WAARSCHUWING: </b> Hierdoor worden gegevens op het externe systeem gewist.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1350 +d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1351 +"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Krachtige acties",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1352 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Krachtige actie","Status controleren ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1353 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Krachtige actie","Status controleren ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1354 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1379,10 +1382,10 @@ targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+
1382 function powerActionResponse5(b,c,a,d){}function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1383 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1384 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1382 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1383 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-opslag voor deze computer.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+
1384 -"Wortel";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Downloaden","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",
1385 -function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Geen bestanden gevonden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Uploaden...","UploadToStorage()"):
1385 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1386 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer Intel&reg; AMT-opslag voor deze computer.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+" / "+q):e+
1387 +"Wortel";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Downloaden","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",
1388 +function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Geen bestanden gevonden.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Uploaden...","UploadToStorage()"):
1389 ""));QH(55,a)}else QH(55,"Kan opslaggegevens niet laden ...<br/>"+AddButton("Vernieuwen","PullStorage()"))}function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Verkoper",b));""!=c&&(e+=addHtmlValue("Toepassing",c));e+=addHtmlValue("Naam",a);e+=addHtmlValue("Grootte",v.size+" bytes");v.link&&(e+=addHtmlValue("Koppeling",v.link));setDialogMode(11,"Opslagitem",5,showStorageDetailsEx,e,d)}}
1390 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("Opslag",format("Kan bestand (ERR {0}) niet verwijderen, controleer of de computer is ingeschakeld.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}
1391 function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}
@@ -1395,8 +1398,8 @@ function UploadToStorageEx(b,c){if(c)d=new FileReader,d.onload=UploadToStorageEx
1398 function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0].name:"");b=b.split(" ").join("");var c=b.split("-");3==c.length&&12>c[0].length&&12>c[1].length&&(Q("mstoragevendor").value=c[0],Q("mstorageapplication").value=c[1],b=c[2]);b=b.split("-").join("");b.endsWith(".gz")&&(b=b.substring(0,b.length-3));b.endsWith(".htm")||b.endsWith(".html")?Q("mstoragetype").value="text/html":b.endsWith(".txt")&&(Q("mstoragetype").value="text/plain");11<b.length&&(b=b.substring(0,11));Q("mstoragefilename").value=
1399 b}
1400 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1398 -"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dagen").replace("H"," uren").replace("M"," minuten");b=b.replace(" 1 dag"," 1 dag").replace(" 1 uur"," 1 uur").replace(" 1 minuut"," 1 minuut");return b.substring(0,b.length-1)}
1399 -function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1401 +"<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1402 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dagen").replace("H"," uren").replace("M"," minuten");b=b.replace(" 1 dag"," 1 dag").replace(" 1 uur"," 1 uur").replace(" 1 minuut "," 1 minuut ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1403 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Beheer wekalarmen.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, wakker worden "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," Bij"),void 0!=d[c].Interval&&(a+=" en elk"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", verwijder wanneer u klaar bent"),
1404 b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Bewerk...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Geen wekkeralarmen geregistreerd.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Verwijder alle alarmen","RemoveAllAlarms()")+AddButton("Toevoegen",
1405 "showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-pt.htm
+622 -619
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="pt" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Desconectado</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Status do sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Área de trabalho remota</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>arquivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informações hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de Eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Log de auditoria</a><p id=go21 class=nav1 onclick=go(21)><a>Armazenamento</a><p id=go8 class=nav1 onclick=go(8)><a>Configurações de rede</a><p id=go17 class=nav1 onclick=go(17)><a>Configurações da Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configurações de segurança</a><p id=go19 class=nav1 onclick=go(19)><a>Presença de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defesa do sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Contas de usuário</a><p id=go22 class=nav1 onclick=go(22)><a>Assinaturas</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Parar sessão do IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Os disquetes são blocos de 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, os blocos são 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>O firmware deste computador deve ser atualizado,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aqui</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Carregando...</h1></div><div id=p1 style=display:none><h1>Status do sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informações hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de Eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configurações de rede</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Contas de usuário</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Inquerir style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal serial sobre LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou o recurso Serial-over-LAN está desativado<span id=26>, clique aqui para habilitá-lo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Começar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alterne o que a chave de retorno enviará" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Alternar tamanho do terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Alterna o tipo de emulação de teclas F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii estendido" title="Alternar tipo de emulação de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Colar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Área de trabalho remota</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou recurso KVM desativado<span id=37>, clique aqui para habilitá-lo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Vire à esquerda" onclick=drotate(-1)>↺</div><div class=rb title="Vire à direita" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar modo de tela cheia" onkeypress="return false" onkeydown="return false" value=Cheio onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salvar uma captura de tela da área de trabalho remota" onkeypress="return false" onkeydown="return false" value="Salve ..." onclick=deskSaveImage() style=margin-right:3px><input type=button value=Definições... title="Editar configurações da área de trabalho remota" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Alterar o estado de energia da máquina remota" onkeypress="return false" onkeydown="return false" value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Desconectado.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganhar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Vitória + Esquerda<option value=24>Vitória + Direita<option value=5>Shift + Vitória + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Tela em branco&nbsp;</span><span id=47><input id=48 type=checkbox>Apenas visualização&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Log de auditoria</h1><span id=50></span></div><div id=p16 style=display:none><h1>Configurações de segurança</h1><span id=51></span></div><div id=p17 style=display:none><h1>Configurações da Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Defesa do sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presença de agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Armazenamento</h1><span id=55></span></div><div id=p22 style=display:none><h1>Assinaturas de Eventos</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>arquivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Acima>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecionar tudo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renomear onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Excluir onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nova pasta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Envio onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value="cópia de" onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Colar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Atualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Classificar por nome<option value=2>Ordenar por tamanho<option value=3>Classificar por data<option value=4>Descender por nome<option value=5>Desça por tamanho<option value=6>Desça por data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nome do usuário</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Senha*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirme a Senha</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Rede<option value=2>Qualquer</select><div>Permissão</div></div><div>Permissões concedidas</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Mínimo de 8 caracteres com maiúsculas, minúsculas, 0-9 e um dos! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Ação de poder</div></div><div><span style=color:red>Atenção:</span>Algumas ações de energia podem resultar em perda de dados e desconectar as sessões de redirecionamento da área de trabalho, do terminal ou do disco.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Visor principal<option value=1>Visor secundário<option id=d6ThirdDisplay value=2 style=display:none>Terceira exibição</select><div>Exibição de consentimento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificação de Imagem</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Mostrar Cursor do Mouse Local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Taxa de quadros de limite</label><br><label><input type=checkbox id=d7noMouseRotate>Não gire o mouse</label><br></div><div>Outros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualidade</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Dimensionamento</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Nome do usuário</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Senha</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta de redirecionamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Área de trabalho remota KVM</label><label style=display:block><input type=checkbox id=c17>Redirecionamento de IDE<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Não requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Necessário apenas para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre necessário<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">Nome do perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridade</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Autenticação</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Nenhum</select><div>Criptografia</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Senha*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Confirme a Senha</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Isso salvará todo o estado do Intel® AMT desta máquina em arquivo. As senhas não serão salvas, mas alguns dados confidenciais podem ser incluídos.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Desativado<br><input type=radio name=d20 id=d20b value=1>Resposta ICMP<br><input type=radio name=d20 id=d20c value=2>Resposta RMCP<br><input type=radio name=d20 id=d20d value=3>Resposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronização de endereço IP do sistema operacional</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>endereço de IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de sub-rede</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Porta de entrada</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primário</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Desativado<option value=1>Desativado, atualização DHCP<option value=2>ativado</select><div>Cliente DNS dinâmico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalo de atualização (minutos)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>O intervalo padrão é 1440 minutos, o TTL padrão é 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Energizar<option value=10>Redefinir<option value=5>Ciclo de energia<option value=8>Desligar<option id=d24p500 value=500>Despertar do sistema operacional em modo de espera<option id=d24p501 value=501>Economia de energia do SO<option value=999>Definir opções de inicialização</select><div>Comando Remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa no BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Impor inicialização segura</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuração da BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forçar eventos de progresso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Bloquear botão liga / desliga</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Bloquear botão de reset</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Bloquear botão de suspensão</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloquear teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Ignorar a senha do BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS do Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo de segurança</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Apagar seguro Intel® remoto</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configurações de inicialização</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nenhum<option id=ForceDVDBootOption value=1>Forçar inicialização de CD / DVD<option id=ForcePXEBootOption value=2>Forçar inicialização PXE<option id=ForceHDBootOption value=3>Forçar inicialização do disco rígido<option id=ForceDiagBootOption value=4>Forçar inicialização de diagnóstico</select><div>Fonte de Inicialização</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nenhum<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Inicializar em disquete<option value=1>Inicialize no CDROM</select><div>Dispositivo de inicialização IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema padrão<option id=c46 value=1>Quieto<option id=c47 value=2>Verbose<option id=c48 value=3>Tela em branco</select><div>Verbocidade</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Senha do RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nome do alarme</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Data de vigília (ano-mês-dia)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Tempo de vigília (hora: min: seg)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervalo (dias-horas-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Mantenha o alarme<option value=1>Excluir ao concluir</select></div><div style=padding-top:4px>Depois de acordar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>ativado<br></label><label><input type=radio name=d26b id=c50 value=0>Desativado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>ativado<br></label><label><input type=radio name=d26a id=c52 value=0>Desativado<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value="Está bem" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Excluir style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="pt" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Conectar onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Desconectado</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Status do sistema</a><p id=go14 class=nav1 onclick=go(14)><a>Área de trabalho remota</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>arquivos</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Informações hardware</a><p id=go6 class=nav1 onclick=go(6)><a>Registro de Eventos</a><p id=go15 class=nav1 onclick=go(15)><a>Log de auditoria</a><p id=go21 class=nav1 onclick=go(21)><a>Armazenamento</a><p id=go8 class=nav1 onclick=go(8)><a>Configurações de rede</a><p id=go17 class=nav1 onclick=go(17)><a>Configurações da Internet</a><p id=go16 class=nav1 onclick=go(16)><a>Configurações de segurança</a><p id=go19 class=nav1 onclick=go(19)><a>Presença de agente</a><p id=go18 class=nav1 onclick=go(18)><a>Defesa do sistema</a><p id=go11 class=nav1 onclick=go(11)><a>Contas de usuário</a><p id=go22 class=nav1 onclick=go(22)><a>Assinaturas</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>Navegador WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Mapa de disco" onclick=iderToggleDiskMap()><input type=button value="Parar sessão do IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Os disquetes são blocos de 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, os blocos são 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>O firmware deste computador deve ser atualizado,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>por favor verifique aqui</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Carregando...</h1></div><div id=p1 style=display:none><h1>Status do sistema</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Informações hardware</h1><span id=16></span></div><div id=p6 style=display:none><h1>Registro de Eventos</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Configurações de rede</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Contas de usuário</h1><span id=21></span></div><div id=p12 style=display:none><h1>Navegador WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Inquerir style=margin:4px onclick=wsmanQuery()><input type=button value=Claro style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filtro style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Terminal serial sobre LAN</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou o recurso Serial-over-LAN está desativado<span id=26>, clique aqui para habilitá-lo.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Começar captura" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Conectar onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Desconectado.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Alterne o que a chave de retorno enviará" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Alternar tamanho do terminal" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Alterna o tipo de emulação de teclas F1 a F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Ascii estendido" title="Alternar tipo de emulação de terminal" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Colar disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Área de trabalho remota</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Porta de redirecionamento Intel® AMT ou recurso KVM desativado<span id=37>, clique aqui para habilitá-lo.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>O computador remoto não está ligado, clique aqui para emitir um comando de energia.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Vire à esquerda" onclick=drotate(-1)>↺</div><div class=rb title="Vire à direita" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Alternar modo de tela cheia" onkeypress="return false" onkeydown="return false" value=Cheio onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Salvar uma captura de tela da área de trabalho remota" onkeypress="return false" onkeydown="return false" value="Salve ..." onclick=deskSaveImage() style=margin-right:3px><input type=button value=Definições... title="Editar configurações da área de trabalho remota" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Iniciar operação de montagem remota de disco" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Alterar o estado de energia da máquina remota" onkeypress="return false" onkeydown="return false" value="Ações de poder ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Conectar onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Desconectado.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Ganhar<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + M<option value=20>Win + R<option value=23>Vitória + Esquerda<option value=24>Vitória + Direita<option value=5>Shift + Vitória + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Enviar onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Tipo onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Tela em branco&nbsp;</span><span id=47><input id=48 type=checkbox>Apenas visualização&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Log de auditoria</h1><span id=50></span></div><div id=p16 style=display:none><h1>Configurações de segurança</h1><span id=51></span></div><div id=p17 style=display:none><h1>Configurações da Internet</h1><span id=52></span></div><div id=p18 style=display:none><h1>Defesa do sistema</h1><span id=53></span></div><div id=p19 style=display:none><h1>Presença de agente</h1><span id=54></span></div><div id=p21 style=display:none><h1>Armazenamento</h1><span id=55></span></div><div id=p22 style=display:none><h1>Assinaturas de Eventos</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>arquivos</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Acima>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Selecionar tudo" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Renomear onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Excluir onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Nova pasta" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Envio onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cortar onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value="cópia de" onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Colar onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Atualizar onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Classificar por nome<option value=2>Ordenar por tamanho<option value=3>Classificar por data<option value=4>Descender por nome<option value=5>Desça por tamanho<option value=6>Desça por data</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Nome do usuário</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Senha*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirme a Senha</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Rede<option value=2>Qualquer</select><div>Permissão</div></div><div>Permissões concedidas</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Mínimo de 8 caracteres com maiúsculas, minúsculas, 0-9 e um dos! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Ação de poder</div></div><div><span style=color:red>Atenção:</span>Algumas ações de energia podem resultar em perda de dados e desconectar as sessões de redirecionamento da área de trabalho, do terminal ou do disco.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Código de consentimento</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Visor principal<option value=1>Visor secundário<option id=d6ThirdDisplay value=2 style=display:none>Terceira exibição</select><div>Exibição de consentimento</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Codificação de Imagem</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Desativado<option value=2>Automatic<option value=3>ativado</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Mostrar Cursor do Mouse Local</label><br><label><input type=checkbox id=d7showcad>Mostrar Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Taxa de quadros de limite</label><br><label><input type=checkbox id=d7noMouseRotate>Não gire o mouse</label><br></div><div>Outros ajustes</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Qualidade</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>Dimensionamento</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Nome do usuário</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Senha</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Porta de redirecionamento</label><label id=c15 style=display:block><input type=checkbox id=c16>Área de trabalho remota KVM</label><label style=display:block><input type=checkbox id=c17>Redirecionamento de IDE<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Não requerido<br></label><label><input type=radio name=d10 id=c20 value=1>Necessário apenas para KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Sempre necessário<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">Nome do perfil</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Máximo de 32 caracteres"><div title="Máximo de 32 caracteres">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Prioridade</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Autenticação</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Nenhum</select><div>Criptografia</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Senha*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Comprimento entre 8 e 63 caracteres"><div title="Comprimento entre 8 e 63 caracteres">Confirme a Senha</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Isso salvará todo o estado do Intel® AMT desta máquina em arquivo. As senhas não serão salvas, mas alguns dados confidenciais podem ser incluídos.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Desativado<br><input type=radio name=d20 id=d20b value=1>Resposta ICMP<br><input type=radio name=d20 id=d20c value=2>Resposta RMCP<br><input type=radio name=d20 id=d20d value=3>Resposta ICMP e RMCP<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Sincronização de endereço IP do sistema operacional</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>endereço de IP</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Marca de sub-rede</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Porta de entrada</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS primário</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>DNS alternativo</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Desativado<option value=1>Desativado, atualização DHCP<option value=2>ativado</select><div>Cliente DNS dinâmico</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Intervalo de atualização (minutos)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (segundos)</div></div><div style=font-size:10px><br>O intervalo padrão é 1440 minutos, o TTL padrão é 900 segundos.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Energizar<option value=10>Redefinir<option value=5>Ciclo de energia<option value=8>Desligar<option id=d24p500 value=500>Despertar do sistema operacional em modo de espera<option id=d24p501 value=501>Economia de energia do SO<option value=999>Definir opções de inicialização</select><div>Comando Remoto</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>Pausa no BIOS</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Impor inicialização segura</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Configuração da BIOS</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Forçar eventos de progresso</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Bloquear botão liga / desliga</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Bloquear botão de reset</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Bloquear botão de suspensão</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Bloquear teclado</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Ignorar a senha do BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>BIOS do Reflash</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Modo de segurança</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Apagar seguro Intel® remoto</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Configurações de inicialização</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nenhum<option id=ForceDVDBootOption value=1>Forçar inicialização de CD / DVD<option id=ForcePXEBootOption value=2>Forçar inicialização PXE<option id=ForceHDBootOption value=3>Forçar inicialização do disco rígido<option id=ForceDiagBootOption value=4>Forçar inicialização de diagnóstico</select><div>Fonte de Inicialização</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Nenhum<option value=1>Índice 1<option value=2>Índice 2<option value=3>Índice 3<option value=3>Índice 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Inicializar em disquete<option value=1>Inicialize no CDROM</select><div>Dispositivo de inicialização IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Sistema padrão<option id=c46 value=1>Quieto<option id=c47 value=2>Verbose<option id=c48 value=3>Tela em branco</select><div>Verbocidade</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Senha do RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Nome do alarme</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Data de vigília (ano-mês-dia)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Tempo de vigília (hora: min: seg)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Intervalo (dias-horas-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Mantenha o alarme<option value=1>Excluir ao concluir</select></div><div style=padding-top:4px>Depois de acordar</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>ativado<br></label><label><input type=radio name=d26b id=c50 value=0>Desativado<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>ativado<br></label><label><input type=radio name=d26a id=c52 value=0>Desativado<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancelar style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value="Está bem" style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Excluir style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,176 +12,177 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Dados inv\u00e1lidos";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Dados inv\u00e1lidos";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"C\u00e3o de guarda do agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... alterado para"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrus\u00e3o de caso";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Uma sess\u00e3o remota Serial Over LAN foi estabelecida.";if(1==c[2])return"Sess\u00e3o Remota Serial Over LAN conclu\u00edda. O controle do usu\u00e1rio foi restaurado.";if(2==c[2])return"Uma sess\u00e3o remota de redirecionamento de IDE foi estabelecida.";
93 +a&&170==c[0])return"C\u00e3o de guarda do agente"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... alterado para"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Intrus\u00e3o de caso";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"Uma sess\u00e3o remota Serial Over LAN foi estabelecida.";if(1==c[2])return"Sess\u00e3o Remota Serial Over LAN conclu\u00edda. O controle do usu\u00e1rio foi restaurado.";if(2==c[2])return"Uma sess\u00e3o remota de redirecionamento de IDE foi estabelecida.";
94 if(3==c[2])return"Sess\u00e3o remota de redirecionamento de IDE conclu\u00edda. O controle do usu\u00e1rio foi restaurado."}if(36==a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="com fio"),4294967293==a?"Todos os filtros de pacotes recebidos foram correspondidos em"+b+" interface.":4294967292==a?"Todos os filtros de pacotes de sa\u00edda foram correspondidos em"+b+" interface.":4294967290==a?"O filtro de pacotes falsificados foi correspondido em"+b+" interface.":"Filtro"+
95 a+" foi combinado em"+b+" interface.";if(192==a)return 0==c[2]?"Pol\u00edtica de seguran\u00e7a invocada. Algum ou todo o tr\u00e1fego de rede (TX) foi interrompido.":2==c[2]?"Pol\u00edtica de seguran\u00e7a invocada. Algum ou todo o tr\u00e1fego de rede (RX) foi interrompido.":"Pol\u00edtica de seguran\u00e7a invocada.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"Solicita\u00e7\u00e3o do usu\u00e1rio para conex\u00e3o remota.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"Erro EAC: tentativa de obter postura enquanto o NAC no IntelTM AMT est\u00e1 desativado.";
96 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"Erro HWA: erro geral"}return 6==a?"Falha na autentica\u00e7\u00e3o"+(c[1]+(c[2]<<8))+" vezes. O sistema pode estar sob ataque.":30==a?"Nenhuma m\u00eddia inicializ\u00e1vel":32==a?"Bloqueio do sistema operacional ou interrup\u00e7\u00e3o de energia":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"Falha na inicializa\u00e7\u00e3o do sistema":37==a?"Firmware do sistema iniciado (pelo menos uma CPU est\u00e1 sendo executada corretamente).":
97 -"Tipo de sensor desconhecido #"+a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);
98 -0==b.InitiatorType&&(C=a.charCodeAt(5),b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>Porta padr\u00e3o KVM</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);
99 -b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,
100 -w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,
101 -g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),
102 -z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=
103 -b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+
104 -a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
108 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
110 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
111 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
112 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
113 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
115 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
116 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
118 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
120 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
121 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
122 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
123 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
125 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
127 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
128 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
130 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
133 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
134 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
135 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
137 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
138 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
139 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
142 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
143 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
144 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
145 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
148 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
149 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
150 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
97 +"Tipo de sensor desconhecido #"+a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);
98 +0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>Porta padr\u00e3o KVM</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);
99 +b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,
100 +w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,
101 +h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),
102 +z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=
103 +b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+
104 +a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
106 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
107 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
108 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
109 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
110 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
111 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
112 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
113 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
114 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
115 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
116 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
117 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
118 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
119 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
120 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
121 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
122 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
123 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
124 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
125 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
126 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
127 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
128 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
129 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
130 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
131 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
132 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
133 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
134 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
135 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
136 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
137 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
138 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
139 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
140 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
141 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
142 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
143 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
144 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
145 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
146 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
147 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
148 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
149 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
150 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
151 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
152 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
153 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
154 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
155 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
156 -[a,b,[]])};var E="N\u00e3o especificado. ; Nenhuma mem\u00f3ria do sistema est\u00e1 fisicamente instalada no sistema. ; Nenhuma mem\u00f3ria utiliz\u00e1vel do sistema, toda a mem\u00f3ria instalada sofreu uma falha irrecuper\u00e1vel. ; Falha irrecuper\u00e1vel no disco r\u00edgido / dispositivo ATAPI / IDE. ; Falha irrecuper\u00e1vel na placa do sistema. ; Disquete irrecuper\u00e1vel falha no subsistema. ; Falha irrecuper\u00e1vel no controlador de disco r\u00edgido. ; Falha irrecuper\u00e1vel no teclado PS / 2 ou USB. ; M\u00eddia de inicializa\u00e7\u00e3o remov\u00edvel n\u00e3o encontrada. ; Falha irrecuper\u00e1vel no controlador de v\u00eddeo. ; Nenhum dispositivo de v\u00eddeo detectado. ; Detectada corrup\u00e7\u00e3o de ROM de firmware (BIOS). ; Incompatibilidade de tens\u00e3o da CPU (processadores que compartilham a mesma fonte t\u00eam requisitos de tens\u00e3o incompat\u00edveis) ; Falha na correspond\u00eancia da velocidade da CPU".split(";"),
157 -m="N\u00e3o especificado. ; Inicializa\u00e7\u00e3o da mem\u00f3ria. ; Iniciando a inicializa\u00e7\u00e3o e o teste do disco r\u00edgido ; Inicializa\u00e7\u00e3o do (s) processador (es) secund\u00e1rio ; Autentica\u00e7\u00e3o do usu\u00e1rio ; Configura\u00e7\u00e3o do sistema iniciado pelo usu\u00e1rio ; Configura\u00e7\u00e3o do recurso USB ; Configura\u00e7\u00e3o do recurso PCI ; Configura\u00e7\u00e3o do recurso PCI ; Inicializa\u00e7\u00e3o da ROM opcional ; Inicializa\u00e7\u00e3o da ROM ; Inicializa\u00e7\u00e3o do v\u00eddeo ; Inicializa\u00e7\u00e3o do cache ; SM Inicializa\u00e7\u00e3o de barramento ; Inicializa\u00e7\u00e3o do controlador do teclado ; Inicializa\u00e7\u00e3o do controlador incorporado / controlador de gerenciamento ; Conex\u00e3o da esta\u00e7\u00e3o de acoplamento ; Habilitando a esta\u00e7\u00e3o de acoplamento ; Eje\u00e7\u00e3o da esta\u00e7\u00e3o de acoplamento ; Desabilitando a esta\u00e7\u00e3o de acoplamento ; Esta\u00e7\u00e3o de acoplamento desativada ; Chamada do vetor de ativa\u00e7\u00e3o do sistema operacional ; Iniciando o processo de inicializa\u00e7\u00e3o do sistema ; Inicializa\u00e7\u00e3o do rodap\u00e9 ou da placa-m\u00e3e ; reservada ; Inicializa\u00e7\u00e3o de disquete ; Teste do teclado ; Teste do dispositivo apontador ; Inicializa\u00e7\u00e3o do processador prim\u00e1rio".split(";"),
155 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
156 +[a,b,[]])};var D="N\u00e3o especificado. ; Nenhuma mem\u00f3ria do sistema est\u00e1 fisicamente instalada no sistema. ; Nenhuma mem\u00f3ria utiliz\u00e1vel do sistema, toda a mem\u00f3ria instalada sofreu uma falha irrecuper\u00e1vel. ; Falha irrecuper\u00e1vel no disco r\u00edgido / dispositivo ATAPI / IDE. ; Falha irrecuper\u00e1vel na placa do sistema. ; Disquete irrecuper\u00e1vel falha no subsistema. ; Falha irrecuper\u00e1vel no controlador de disco r\u00edgido. ; Falha irrecuper\u00e1vel no teclado PS / 2 ou USB. ; M\u00eddia de inicializa\u00e7\u00e3o remov\u00edvel n\u00e3o encontrada. ; Falha irrecuper\u00e1vel no controlador de v\u00eddeo. ; Nenhum dispositivo de v\u00eddeo detectado. ; Detectada corrup\u00e7\u00e3o de ROM de firmware (BIOS). ; Incompatibilidade de tens\u00e3o da CPU (processadores que compartilham a mesma fonte t\u00eam requisitos de tens\u00e3o incompat\u00edveis) ; Falha na correspond\u00eancia da velocidade da CPU".split(";"),
157 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
158 k="N\u00e3o especificado ; Outros ; Desconhecido ; Processador ; Disco ; Perif\u00e9rico ; M\u00f3dulo de gerenciamento do sistema ; Placa do sistema ; M\u00f3dulo de mem\u00f3ria ; M\u00f3dulo do processador ; Fonte de alimenta\u00e7\u00e3o ; Fonte de alimenta\u00e7\u00e3o ; Adicione um cart\u00e3o ; Placa do painel frontal ; Placa do painel traseiro ; Placa do painel traseiro ; Placa do sistema de energia ; Placa de acionamento ; Painel traseiro da unidade ; Expans\u00e3o interna do sistema placa ; Outra placa de sistema ; Placa processadora ; Unidade de pot\u00eancia ; M\u00f3dulo de pot\u00eancia ; Placa de gerenciamento de energia ; Placa do painel traseiro do chassi ; Chassis do sistema ; Sub-chassi ; Outra placa do chassi ; Compartimento de unidades de disco ; Compartimento de perif\u00e9ricos ; Compartimento de dispositivos ; Compartimento de refrigera\u00e7\u00e3o ; Ventilador ; Unidade de refrigera\u00e7\u00e3o ; Interconex\u00e3o por cabo ; Dispositivo de mem\u00f3ria ; Software de gerenciamento do sistema ; BIOS ; Intel (r) ME ; Barramento do sistema ; Grupo ; Intel (r) ME ; Ambiente externo ; Bateria ; L\u00e2mina de processamento ; Interruptor de conectividade ; Interruptor de conectividade ; Processador / m\u00f3dulo de mem\u00f3ria ; M\u00f3dulo de E / S ; M\u00f3dulo de E / S do processador ; Firmware do controlador de gerenciamento ; Canal IPMI ; Barramento PCI ; Barramento PCI Express ; Barramento SCSI ; Barramento SATA / SAS ; Barramento frontal do processador".split(";");
159 -h.RealmNames=";; Redirecionamento ;; Ativo de hardware ; Controle remoto ; Armazenamento ; Gerenciador de eventos ; Administrador de armazenamento ; Presen\u00e7a local do agente ; Presen\u00e7a remota do agente ; Disjuntor ; Tempo de rede ; Informa\u00e7\u00f5es gerais ; Atualiza\u00e7\u00e3o de firmware ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Leitor de log de eventos ; Log de auditoria ; Regi\u00e3o da ACL ;;; Sistema local".split(";");h.WatchdogCurrentStates=
160 -{1:"n\u00e3o foi iniciado",2:"Parado",4:"Corrida",8:"Expirado",16:"Suspenso"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
161 -O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"Admin de seguran\u00e7a",17:"RCO",18:"Gerenciador de redirecionamento",19:"Gerenciador de Atualiza\u00e7\u00e3o de Firmware",20:"Log de auditoria de seguran\u00e7a",21:"Hora da rede",22:"Administra\u00e7\u00e3o de rede",23:"Administra\u00e7\u00e3o de armazenamento",24:"Gerente de eventos",25:"Gerente do disjuntor",26:"Gerenciador de presen\u00e7a do agente",27:"Configura\u00e7\u00e3o sem fio",28:"EAC",29:"KVM",30:"Eventos de aceita\u00e7\u00e3o do usu\u00e1rio",
159 +g.RealmNames=";; Redirecionamento ;; Ativo de hardware ; Controle remoto ; Armazenamento ; Gerenciador de eventos ; Administrador de armazenamento ; Presen\u00e7a local do agente ; Presen\u00e7a remota do agente ; Disjuntor ; Tempo de rede ; Informa\u00e7\u00f5es gerais ; Atualiza\u00e7\u00e3o de firmware ; EIT ; LocalUN ; Endpoint Access Control ; Endpoint Access Control Admin ; Leitor de log de eventos ; Log de auditoria ; Regi\u00e3o da ACL ;;; Sistema local".split(";");g.WatchdogCurrentStates=
160 +{1:"n\u00e3o foi iniciado",2:"Parado",4:"Corrida",8:"Expirado",16:"Suspenso"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),
161 +O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"Admin de seguran\u00e7a",17:"RCO",18:"Gerenciador de redirecionamento",19:"Gerenciador de Atualiza\u00e7\u00e3o de Firmware",20:"Log de auditoria de seguran\u00e7a",21:"Hora da rede",22:"Administra\u00e7\u00e3o de rede",23:"Administra\u00e7\u00e3o de armazenamento",24:"Gerente de eventos",25:"Gerente do disjuntor",26:"Gerenciador de presen\u00e7a do agente",27:"Configura\u00e7\u00e3o sem fio",28:"EAC",29:"KVM",30:"Eventos de aceita\u00e7\u00e3o do usu\u00e1rio",
162 32:"Tela em branco",33:"Eventos Watchdog",1600:"Aprovisionamento iniciado",1601:"Aprovisionamento conclu\u00eddo",1602:"Entrada ACL adicionada",1603:"Entrada da ACL modificada",1604:"Entrada da ACL removida",1605:"Acesso ACL com credenciais inv\u00e1lidas",1606:"Estado de entrada da ACL",1607:"Estado do TLS alterado",1608:"Conjunto de certificados do servidor TLS",1609:"Remover certificado de servidor TLS",1610:"Adicionado certificado raiz confi\u00e1vel TLS",1611:"Certificado raiz confi\u00e1vel TLS removido",
163 1612:"Conjunto de chaves pr\u00e9-compartilhadas TLS",1613:"Configura\u00e7\u00f5es do Kerberos modificadas",1614:"Chave principal do Kerberos modificada",1615:"Redefini\u00e7\u00e3o de contadores de desgaste do flash",1616:"Pacote de energia modificado",1617:"Definir modo de autentica\u00e7\u00e3o de regi\u00e3o",1618:"Atualizar cliente para o modo de controle de administrador",1619:"Desprovisionamento iniciado",1700:"Power Up realizado",1701:"Desativa\u00e7\u00e3o realizada",1702:"Ciclo de energia realizado",
164 -1703:"Reset realizado",1704:"Definir op\u00e7\u00f5es de inicializa\u00e7\u00e3o",1800:"Sess\u00e3o IDER aberta",1801:"Sess\u00e3o IDER encerrada",1802:"IDER ativado",1803:"IDER desativado",1804:"Sess\u00e3o SoL aberta",1805:"Sess\u00e3o SoL Encerrada",1806:"SoL ativado",1807:"SoL desativado",1808:"Sess\u00e3o KVM iniciada",1809:"Sess\u00e3o KVM encerrada",1810:"KVM ativado",1811:"KVM desativado",1812:"Senha do VNC falhou 3 vezes",1900:"Firmware Atualizado",1901:"Falha na atualiza\u00e7\u00e3o do firmware",
165 -2E3:"Log de auditoria de seguran\u00e7a limpo",2001:"Diretiva de auditoria de seguran\u00e7a modificada",2002:"Log de auditoria de seguran\u00e7a desativado",2003:"Log de auditoria de seguran\u00e7a ativado",2004:"Log de auditoria de seguran\u00e7a exportado",2005:"Log de auditoria de seguran\u00e7a recuperado",2100:"Conjunto de horas do Intel&reg; ME",2200:"Conjunto de par\u00e2metros TCPIP",2201:"Conjunto de nomes de host",2202:"Conjunto de nomes de dom\u00ednio",2203:"Conjunto de par\u00e2metros da VLAN",
166 -2204:"Conjunto de Pol\u00edticas de Link",2205:"Conjunto de par\u00e2metros IPv6",2300:"Conjunto de atributos de armazenamento global",2301:"EACL de armazenamento modificado",2302:"FPACL de armazenamento modificado",2303:"Opera\u00e7\u00e3o de grava\u00e7\u00e3o de armazenamento",2400:"Alerta Inscrito",2401:"Alerta cancelado",2402:"Log de eventos limpo",2403:"Log de eventos congelado",2500:"CB Filter Added",2501:"Filtro CB removido",2502:"CB Policy Added",2503:"Pol\u00edtica de CB removida",2504:"Conjunto de pol\u00edticas padr\u00e3o do CB",
167 -2505:"Conjunto de op\u00e7\u00f5es de CB Heuristics",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Adicionado",2601:"C\u00e3o de guarda do agente removido",2602:"Conjunto de a\u00e7\u00f5es do agente de vigil\u00e2ncia",2700:"Wireless Profile Added",2701:"Perfil sem fio removido",2702:"Perfil sem fio atualizado",2800:"EAC Posture Signer SET",2801:"EAC ativado",2802:"EAC desativado",2803:"Estado da postura da EAC",2804:"Op\u00e7\u00f5es de conjunto de EAC",2900:"Ativa\u00e7\u00e3o KVM ativada",
168 -2901:"Desativa\u00e7\u00e3o da KVM desativada",2902:"Senha KVM alterada",2903:"Consentimento da KVM com \u00eaxito",2904:"Falha no consentimento da KVM",3E3:"Altera\u00e7\u00e3o da pol\u00edtica de aceita\u00e7\u00e3o",3001:"Enviar evento de c\u00f3digo de consentimento",3002:"Iniciar evento bloqueado de aceita\u00e7\u00e3o"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):
169 -null;if(1605==a)return["Acesso ME inv\u00e1lido","Acesso MEBx inv\u00e1lido"][b.charCodeAt(0)];if(1606==a){var c=["Desativado","ativado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Controlo remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Desativado"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN remoto"][b.charCodeAt(0)]:
170 -1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" para"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"De"+["Nenhum","KVM","Todos"][b.charCodeAt(0)]+" para"+["Nenhum","KVM","Todos"][b.charCodeAt(1)]:3001==a?["Sucesso","Falhou 3 vezes"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};
171 -return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
164 +1703:"Reset realizado",1704:"Definir op\u00e7\u00f5es de inicializa\u00e7\u00e3o",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"Sess\u00e3o IDER aberta",1801:"Sess\u00e3o IDER encerrada",1802:"IDER ativado",1803:"IDER desativado",1804:"Sess\u00e3o SoL aberta",1805:"Sess\u00e3o SoL Encerrada",1806:"SoL ativado",1807:"SoL desativado",1808:"Sess\u00e3o KVM iniciada",
165 +1809:"Sess\u00e3o KVM encerrada",1810:"KVM ativado",1811:"KVM desativado",1812:"Senha do VNC falhou 3 vezes",1900:"Firmware Atualizado",1901:"Falha na atualiza\u00e7\u00e3o do firmware",2E3:"Log de auditoria de seguran\u00e7a limpo",2001:"Diretiva de auditoria de seguran\u00e7a modificada",2002:"Log de auditoria de seguran\u00e7a desativado",2003:"Log de auditoria de seguran\u00e7a ativado",2004:"Log de auditoria de seguran\u00e7a exportado",2005:"Log de auditoria de seguran\u00e7a recuperado",2100:"Conjunto de horas do Intel&reg; ME",
166 +2200:"Conjunto de par\u00e2metros TCPIP",2201:"Conjunto de nomes de host",2202:"Conjunto de nomes de dom\u00ednio",2203:"Conjunto de par\u00e2metros da VLAN",2204:"Conjunto de Pol\u00edticas de Link",2205:"Conjunto de par\u00e2metros IPv6",2300:"Conjunto de atributos de armazenamento global",2301:"EACL de armazenamento modificado",2302:"FPACL de armazenamento modificado",2303:"Opera\u00e7\u00e3o de grava\u00e7\u00e3o de armazenamento",2400:"Alerta Inscrito",2401:"Alerta cancelado",2402:"Log de eventos limpo",
167 +2403:"Log de eventos congelado",2500:"CB Filter Added",2501:"Filtro CB removido",2502:"CB Policy Added",2503:"Pol\u00edtica de CB removida",2504:"Conjunto de pol\u00edticas padr\u00e3o do CB",2505:"Conjunto de op\u00e7\u00f5es de CB Heuristics",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Adicionado",2601:"C\u00e3o de guarda do agente removido",2602:"Conjunto de a\u00e7\u00f5es do agente de vigil\u00e2ncia",2700:"Wireless Profile Added",2701:"Perfil sem fio removido",2702:"Perfil sem fio atualizado",
168 +2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC Posture Signer SET",2801:"EAC ativado",2802:"EAC desativado",2803:"Estado da postura da EAC",2804:"Op\u00e7\u00f5es de conjunto de EAC",2900:"Ativa\u00e7\u00e3o KVM ativada",2901:"Desativa\u00e7\u00e3o da KVM desativada",2902:"Senha KVM alterada",2903:"Consentimento da KVM com \u00eaxito",2904:"Falha no consentimento da KVM",
169 +3E3:"Altera\u00e7\u00e3o da pol\u00edtica de aceita\u00e7\u00e3o",3001:"Enviar evento de c\u00f3digo de consentimento",3002:"Iniciar evento bloqueado de aceita\u00e7\u00e3o",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):
170 +null;if(1605==a)return["Acesso ME inv\u00e1lido","Acesso MEBx inv\u00e1lido"][b.charCodeAt(0)];if(1606==a){var c=["Desativado","ativado"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"Controlo remoto"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local"+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?g.RealmNames[ReadInt(b,0)]+","+["NoAuth","Auth","Desativado"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","MEI local","WSMAN local","WSAMN remoto"][b.charCodeAt(0)]:
171 +1900==a?"De"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" para"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"De"+["Nenhum","KVM","Todos"][b.charCodeAt(0)]+" para"+["Nenhum","KVM","Todos"][b.charCodeAt(1)]:3001==a?["Sucesso","Falhou 3 vezes"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};
172 +return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
173 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
174 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
175 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
176 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
176 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
177 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
178 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
179 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
180 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
181 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
182 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
183 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
184 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
177 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
178 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
179 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
180 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
181 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
182 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
183 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
184 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
185 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
186 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
187 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
188 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -192,10 +193,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
193 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
194 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
195 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
195 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
196 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
197 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
197 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
198 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
198 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
199 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
200 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
201 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
202 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -205,69 +206,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
206 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
207 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
208 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
208 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
209 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
210 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
211 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
212 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
213 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
214 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
215 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
209 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
210 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
211 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
212 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
213 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
214 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
215 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
216 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
217 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
217 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
218 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
219 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
220 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
221 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
222 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
223 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
224 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
225 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
226 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
227 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
228 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
229 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
230 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
218 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
219 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
220 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
221 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
222 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
223 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
224 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
225 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
226 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
227 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
228 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
229 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
230 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
231 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
232 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
233 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
234 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
235 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
235 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
236 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
237 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
236 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
237 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
238 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
239 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
240 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
241 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
242 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
243 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
243 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
244 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
245 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
246 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
247 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
248 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
249 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
250 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
244 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
245 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
246 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
247 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
248 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
249 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
250 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
251 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
252 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
253 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
254 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
254 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
255 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
256 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
257 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
258 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
259 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
260 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
261 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
262 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
263 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
264 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
265 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
266 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
255 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
256 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
257 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
258 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
259 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
260 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
261 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
262 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
263 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
264 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
265 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
266 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
267 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
268 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
268 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
269 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
270 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
269 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
270 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
271 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
272 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
273 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
274 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -281,213 +282,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
282 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
283 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
284 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
284 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
285 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
286 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
286 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
287 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
288 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
289 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
290 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
291 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
292 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
293 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
287 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
288 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
289 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
290 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
291 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
292 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
293 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
294 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
295 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
295 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
296 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
297 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
296 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
297 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
298 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
299 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
300 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
300 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
301 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
302 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
302 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
303 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
304 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
304 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
305 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
306 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
307 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
308 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
309 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
310 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
311 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
312 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
313 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
314 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
315 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
316 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
305 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
306 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
307 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
308 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
309 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
310 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
311 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
312 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
313 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
314 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
315 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
316 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
317 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
318 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
318 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
319 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
320 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
321 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
322 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
323 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
324 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
325 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
326 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
319 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
320 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
321 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
322 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
323 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
324 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
325 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
326 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
327 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
328 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
329 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
330 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
331 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
332 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
333 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
333 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
334 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
335 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
336 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
337 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
338 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
334 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
335 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
336 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
337 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
338 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
339 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
340 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
340 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
341 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
342 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
342 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
343 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
344 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
345 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
346 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
347 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
348 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
349 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
350 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
351 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
343 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
344 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
345 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
346 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
347 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
348 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
349 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
350 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
351 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
352 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
353 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
353 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
354 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
355 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
356 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
357 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
354 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
355 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
356 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
357 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
358 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
359 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
360 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
361 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
361 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
362 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
363 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
364 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
365 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
365 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
366 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
367 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
368 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
369 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
370 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
371 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
366 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
367 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
368 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
369 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
370 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
371 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
372 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
373 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
373 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
374 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
375 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
376 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
377 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
374 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
375 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
376 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
377 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
378 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
379 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
379 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
380 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
381 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
382 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
382 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
383 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
383 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
384 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
385 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
386 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
386 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
387 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
388 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
389 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
387 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
388 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
389 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
390 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
391 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
391 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
392 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
393 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
394 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
392 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
393 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
394 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
395 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
396 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
397 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
398 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
398 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
399 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
400 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
401 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
402 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
403 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
404 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
405 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
406 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
407 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
408 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
409 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
399 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
400 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
401 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
402 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
403 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
404 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
405 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
406 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
407 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
408 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
409 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
410 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
411 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
411 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
412 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
413 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
412 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
413 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
414 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
415 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
415 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
416 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
417 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
418 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
419 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
416 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
417 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
418 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
419 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
420 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
421 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
421 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
422 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
423 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
423 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
424 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
425 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
424 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
425 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
426 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
427 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
427 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
428 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
429 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
430 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
431 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
432 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
433 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
434 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
435 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
436 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
437 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
438 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
439 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
440 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
441 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
442 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
443 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
444 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
445 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
428 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
429 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
430 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
431 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
432 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
433 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
434 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
435 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
436 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
437 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
438 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
439 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
440 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
441 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
442 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
443 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
444 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
445 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
446 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
447 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
447 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
448 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
449 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
449 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
450 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
451 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
452 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
452 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
453 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
454 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
455 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
456 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
457 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
458 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
459 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
460 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
461 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
462 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
463 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
464 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
465 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
466 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
467 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
468 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
453 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
454 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
455 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
456 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
457 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
458 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
459 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
460 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
461 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
462 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
463 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
464 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
465 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
466 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
467 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
468 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
469 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
470 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
471 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
472 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
472 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
473 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
474 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
473 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
474 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
475 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
476 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
476 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
477 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
478 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
479 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
480 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
481 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
482 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
483 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
483 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
484 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
485 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
486 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
484 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
485 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
486 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
487 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
488 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
488 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
489 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
490 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
489 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
490 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
491 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
492 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
493 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
494 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -505,111 +506,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
506 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
507 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
508 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
508 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
509 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
510 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
511 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
509 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
510 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
511 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
512 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
513 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
513 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
514 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
515 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
516 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
517 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
514 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
515 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
516 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
517 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
518 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
519 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
519 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
520 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
521 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
522 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
523 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
523 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
524 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
524 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
525 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
526 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
527 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
528 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
528 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
529 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
530 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
531 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
532 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
533 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
534 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
535 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
535 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
536 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
537 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
537 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
538 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
539 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
540 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
541 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
542 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
543 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
544 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
538 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
539 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
540 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
541 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
542 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
543 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
544 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
545 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
546 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
547 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
547 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
548 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
549 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
549 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
550 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
551 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
551 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
552 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
553 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
554 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
555 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
556 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
557 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
558 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
552 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
553 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
554 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
555 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
556 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
557 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
558 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
559 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
560 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
561 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
561 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
562 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
563 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
564 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
565 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
562 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
563 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
564 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
565 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
566 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
567 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
567 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
568 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
569 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
570 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
571 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
572 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
573 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
574 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
575 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
576 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
577 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
578 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
579 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
580 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
581 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
582 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
568 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
569 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
570 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
571 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
572 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
573 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
574 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
575 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
576 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
577 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
578 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
579 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
580 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
581 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
582 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
583 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
584 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
584 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
585 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
586 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
587 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
588 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
589 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
585 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
586 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
587 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
588 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
589 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
590 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
591 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
592 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
592 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
593 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
593 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
594 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
595 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
595 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
596 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
597 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
597 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
598 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
599 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
600 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
601 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
602 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
598 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
599 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
600 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
601 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
602 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
603 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
604 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
604 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
605 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
606 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
605 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
606 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
607 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
608 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
609 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
610 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
611 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
612 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
612 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
613 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
614 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
615 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
616 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -620,20 +621,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
621 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
622 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
623 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
623 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
624 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
624 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
625 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
626 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
626 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
627 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
627 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
628 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
629 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
630 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
630 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
631 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
632 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
633 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
634 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
635 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
635 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
636 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
636 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
637 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
638 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
639 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
640 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -642,20 +643,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
643 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
644 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
645 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
645 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
646 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
647 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
648 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
649 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
650 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
650 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
651 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
652 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
653 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
654 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
655 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
651 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
652 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
653 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
654 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
655 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
656 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
657 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
657 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
658 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
658 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
659 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
660 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
661 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
662 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -679,17 +680,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
680 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
681 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
682 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
682 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
683 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
684 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
685 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
683 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
684 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
685 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
686 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
687 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
688 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
689 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
690 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
691 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
691 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
692 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
692 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
693 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
694 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
695 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
696 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -705,48 +706,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
706 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
707 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
708 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
708 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
709 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
710 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
711 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
712 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
713 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
714 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
715 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
715 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
716 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
717 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
718 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
719 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
719 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
720 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
721 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
721 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
722 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
723 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
724 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
724 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
725 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
726 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
727 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
728 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
729 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
729 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
730 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
731 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
732 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
730 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
731 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
732 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
733 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
734 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
735 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
736 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
737 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
738 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
738 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
739 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
740 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
740 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
741 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
742 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
741 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
742 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
743 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
744 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
745 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
746 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
746 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
747 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
748 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
748 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
749 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
749 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
750 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
751 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
752 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
753 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -754,119 +755,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
755 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
756 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
757 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
757 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
758 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
759 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
760 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
761 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
762 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
763 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
764 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
765 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
766 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
767 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
768 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
769 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
770 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
771 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
772 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
773 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
774 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
775 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
776 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
777 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
778 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
779 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
780 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
781 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
782 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
783 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
784 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
785 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
786 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
787 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
788 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
789 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
790 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
791 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
792 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
793 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
794 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
795 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
796 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
797 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
798 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
799 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
800 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
801 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
802 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
803 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
804 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
805 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
806 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
807 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
808 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
809 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
810 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
811 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
812 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
813 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
814 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
815 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
816 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
817 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
818 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
819 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
820 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
821 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
822 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
823 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
824 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
825 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
826 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
827 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
828 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
829 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
830 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
831 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
832 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
833 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
834 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
835 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
836 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
837 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
838 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
839 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
840 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
841 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
842 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
843 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
844 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
845 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
846 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
847 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
848 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
849 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
850 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
851 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
758 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
759 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
760 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
761 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
762 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
763 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
764 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
765 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
766 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
767 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
768 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
769 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
770 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
771 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
772 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
773 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
774 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
775 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
776 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
777 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
778 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
779 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
780 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
781 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
782 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
783 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
784 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
785 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
786 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
787 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
788 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
789 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
790 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
791 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
792 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
793 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
794 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
795 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
796 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
797 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
798 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
799 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
800 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
801 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
802 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
803 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
804 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
805 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
806 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
807 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
808 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
809 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
810 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
811 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
812 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
813 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
814 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
815 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
816 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
817 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
818 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
819 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
820 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
821 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
822 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
823 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
824 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
825 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
826 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
827 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
828 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
829 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
830 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
831 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
832 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
833 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
834 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
835 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
836 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
837 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
838 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
839 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
840 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
841 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
842 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
843 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
844 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
845 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
846 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
847 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
848 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
849 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
850 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
851 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
852 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
853 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
854 +l.Init();return l},ZLIB=ZLIB||{};
855 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
856 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
854 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
855 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
856 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
857 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
858 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
859 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
860 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
858 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
859 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
861 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
862 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
863 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
864 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
862 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
863 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
864 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
865 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
865 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
866 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
867 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
868 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
869 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
870 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
868 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
869 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
871 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
872 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
873 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
874 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
875 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -888,22 +891,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
891 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
892 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
893 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
891 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
892 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
893 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
894 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
895 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
894 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
895 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
896 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
897 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
898 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
899 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
900 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
901 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
902 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
903 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
901 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
902 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
904 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
905 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
906 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
904 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
905 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
906 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
907 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
908 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
909 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
910 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
911 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
912 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -919,16 +922,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
922 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
923 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
924 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
922 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
923 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
924 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
925 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
926 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
927 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
928 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
925 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
926 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
927 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
928 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
929 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
930 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
931 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
932 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
930 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
931 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Carregando...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
933 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
934 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Carregando...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
935 StatusStrs=["Desconectado","A ligar ...","Configura\u00e7\u00e3o...","Conectado"],t,t2,rsepass=null;
936 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
937 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -961,15 +964,15 @@ function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTim
964 function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Desconhecido</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Ligar"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
965 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Conectado",", Com bateria"][v.PowerSource]);d+=TableEntry("Poder",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>Nenhum</i>":EscapeHtml(c);d+=TableEntry("Nome e dom\u00ednio",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?
966 d+=TableEntry("ID do sistema",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("ID do sistema",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" ativado no modo de controle de administrador (ACM)",4==l.ProvisioningMode&&(n=" ativado no modo de controle de cliente (CCM)",b=9));d+=TableEntry("Intel&reg; ME",
964 -"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
965 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
966 -p&&(e+=", Porta de redirecionamento");q&&(e+=", Serial-over-LAN");n&&(e+=", Redirecionamento de IDE");h&&(e+=", KVM");""==e&&(e=" Nenhum");d+=TableEntry("Recursos ativos",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Visor principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Visor principal",
967 +"v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
968 +p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
969 +q&&(e+=", Porta de redirecionamento");p&&(e+=", Serial-over-LAN");n&&(e+=", Redirecionamento de IDE");g&&(e+=", KVM");""==e&&(e=" Nenhum");d+=TableEntry("Recursos ativos",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Visor principal",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Visor principal",
970 "Visor secund\u00e1rio","3\u00aa exibi\u00e7\u00e3o"][n.DefaultScreen]),e='<span title="'+format("O visor remoto padr\u00e3o \u00e9 {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="Porta 5900 ativada"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"segundos de aceita\u00e7\u00e3o":"segunda inscri\u00e7\u00e3o")),e+=","+n.SessionTimeout+" minuto"+(0<n.SessionTimeout?"s":"")+" sess\u00e3o expirada",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?
968 -((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Supress\u00e3o permitida"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u00c1rea de trabalho remota",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&
969 -void 0!=amtsysstate.IPS_OptInService.response&&(e="Estado desconhecido",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="N\u00e3o requerido"),1==p&&(e="Necess\u00e1rio apenas para KVM"),4294967295==p&&(e="Sempre necess\u00e1rio"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimento do Usu\u00e1rio",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&
971 +((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+=", Supress\u00e3o permitida"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u00c1rea de trabalho remota",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&
972 +void 0!=amtsysstate.IPS_OptInService.response&&(e="Estado desconhecido",q=amtsysstate.IPS_OptInService.response.OptInRequired,0==q&&(e="N\u00e3o requerido"),1==q&&(e="Necess\u00e1rio apenas para KVM"),4294967295==q&&(e="Sempre necess\u00e1rio"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("Consentimento do Usu\u00e1rio",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&
973 (e={0:"Desconhecido",1:"De outros",2:"ativado",3:"Desativado",4:"Desligando",5:"N\u00e3o aplic\u00e1vel",6:"Ativado, mas offline",7:"Em teste",8:"Diferido",9:"Quiesce",10:"Iniciando",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Desconhecido",d+=TableEntry("Boot Features",
971 -addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Pol\u00edtica de energia",
972 -addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Data hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("A\u00e7\u00f5es de poder ...","showPowerActionDlg()")+" ";e+=AddButton("Estado salvo...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
974 +addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("Pol\u00edtica de energia",
975 +addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Data hora",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("A\u00e7\u00f5es de poder ...","showPowerActionDlg()")+" ";e+=AddButton("Estado salvo...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
976 QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Alterar as configura\u00e7\u00f5es de rede pode fazer com que esta p\u00e1gina fique indispon\u00edvel.");d=d+"<br><h2>Configura\u00e7\u00f5es Gerais</h2>"+TableStart();e="";"<i>Nenhum</i>"!=c&&(1==v.SharedFQDN&&(e=", compartilhado com o SO"),0==v.SharedFQDN&&(e=", diferente do SO"));d+=TableEntry("Nome e dom\u00ednio",addLinkConditional(c+
977 e,"showEditNameDlg(1)",xxAccountAdminName));c="Desativado";1==v.DDNSUpdateEnabled?c="Ativado cada"+v.DDNSPeriodicUpdateInterval+" minutos, TTL \u00e9"+v.DDNSTTL+" minutos":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Atualiza\u00e7\u00e3o pelo servidor DHCP");d+=TableEntry("DNS din\u00e2mico",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||
978 1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Interface sem fio":"Interface com fio")+"</h2>";d+=TableStart();d+=TableEntry("Estado do link",1==c.LinkIsUp?"O link est\u00e1 ativo":"Link desativado");if(c.LinkPolicy){c.LinkPolicy=MakeToArray(c.LinkPolicy);e=[];for(B in c.LinkPolicy)1==c.LinkPolicy[B]&&e.push("S0 / AC"),14==c.LinkPolicy[B]&&e.push("Sx / AC"),16==c.LinkPolicy[B]&&e.push("S0 / DC"),224==c.LinkPolicy[B]&&e.push("Sx / DC");
@@ -977,8 +980,8 @@ e,"showEditNameDlg(1)",xxAccountAdminName));c="Desativado";1==v.DDNSUpdateEnable
980 s=xxWireless.CIM_WiFiEndpoint.response.LANID,d+=TableEntry("Estado da R\u00e1dio",xxRadioState[xxWireless.CIM_WiFiEndpoint.response.EnabledState]+", SSID: "+(s?s:"<i>Nenhum</i>")),xxWireless.AMT_WiFiPortConfigurationService&&xxWireless.AMT_WiFiPortConfigurationService.response&&"number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?
981 "ativado":"Desativado","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"ativado":"Desativado","showUefiWifiCoExDlg()",
982 xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Responder ao ping",addLinkConditional(["Desativado","Resposta ICMP","Resposta RMCP","Resposta ICMP e RMCP"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=1==c.DHCPEnabled?"Autom\u00e1tico usando servidor DHCP":"Endere\u00e7o IP est\u00e1tico",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("Estado IPv4",addLinkConditional(e,
980 -"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Endere\u00e7o IPv4",isIpAddress(c.IPAddress,"Nenhum"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway IPv4 / M\u00e1scara",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nenhum")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Servidor de nomes de dom\u00ednio IPv4",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p=
981 -"Desativado",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Endere\u00e7os ativados, autom\u00e1ticos e manuais":"Habilitado, Endere\u00e7os autom\u00e1ticos");d+=TableEntry("Estado IPv6",addLinkConditional(p,"showIPv6StateDlg("+
983 +"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("Endere\u00e7o IPv4",isIpAddress(c.IPAddress,"Nenhum"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("Gateway IPv4 / M\u00e1scara",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"Nenhum")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("Servidor de nomes de dom\u00ednio IPv4",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q=
984 +"Desativado",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Endere\u00e7os ativados, autom\u00e1ticos e manuais":"Habilitado, Endere\u00e7os autom\u00e1ticos");d+=TableEntry("Estado IPv6",addLinkConditional(q,"showIPv6StateDlg("+
985 a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("Endere\u00e7o IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("Endere\u00e7o IPv6","Nenhum");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("Roteador IPv6 padr\u00e3o",
986 c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("Servidor de nomes de dom\u00ednio IPv6",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&
987 go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
@@ -1027,8 +1030,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1030 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Desativado":"ativado",c&2&&(b+="Bloqueado"),c&4&&(b+=", Quase cheio"),c&8&&(b+=", Cheio"),c&16&&(b+=", NoKey"),c="<h1>Configura\u00e7\u00f5es do log de auditoria</h1>"+TableStart(),c+=TableEntry("Estado",b),c+=TableEntry("Armazenamento",a[0].CurrentNumberOfRecords+" registro (s),"+a[0].PercentageFree+"% livre"),c+=TableEntry("Pol\u00edtica de substitui\u00e7\u00e3o",2==a[0].OverwritePolicy?"Envolt\u00f3rios quando cheios":
1031 "Nunca substitui"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1032 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filtro" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Salve \ue051...","SaveAuditLog()")+AddButton("Log clara","ClearAuditLog()"))+"<br>");if(0==c.length)d="Nenhum evento de log de auditoria encontrado.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Tempo</b><td class=r1 style=width:260px><b>Iniciador</b><td class=r1><b>Action</b>";
1030 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1031 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditoria da Intel AMT",auditLog)}
1033 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1034 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Registro de auditoria da Intel AMT",auditLog)}
1035 function ClearAuditLog(b){QH(60,"Limpar log de auditoria?");setDialogMode(1,"Log de auditoria",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1036 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Log de auditoria","Erro: "+d)}
1037 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Tempo",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Iniciador",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Endere\u00e7o",a.NetAddress));d+=addHtmlValue("Inscri\u00e7\u00e3o",a.AuditApp);d+=addHtmlValue("Evento",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Dados estendidos",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);
@@ -1080,7 +1083,7 @@ function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabi
1083 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("C\u00e3es de guarda m\u00e1ximos",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" assistir cachorros");b+=TableEntry("Total de a\u00e7\u00f5es m\u00e1ximas",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" a\u00e7\u00f5es");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>Gerenciar os c\u00e3es de guarda de presen\u00e7a do agente Intel&reg; AMT.<br><br>";
1084 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>Nenhum c\u00e3o de guarda de presen\u00e7a do agente encontrado.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1085 b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="Adicionar a\u00e7\u00e3o ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="Excluir a\u00e7\u00f5es ..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1083 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=": Evento a ser registrado")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Adicionar c\u00e3o de guarda ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1086 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : Evento a ser registrado")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("Adicionar c\u00e3o de guarda ...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1087 function getWatchdogTransitionStr(b){if(31==b)return"Qualquer Estado";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1088 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("Descri\u00e7\u00e3o",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("Entidade monitorada",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("Estado atual",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("Estado ativado",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("Intervalo de inicializa\u00e7\u00e3o",
1089 b.StartupInterval+" segundo (s)");c+=addHtmlValue("Intervalo de tempo limite",b.TimeoutInterval+" segundo (s)");setDialogMode(11,format("C\u00e3o de guarda {0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1176,7 +1179,7 @@ v&&(n+="Desativado,");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Reinos
1179 "newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1180 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Editar conta",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1181 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"Nova conta",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1179 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erro na conta","Par\u00e2metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1182 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Erro na conta","Par\u00e2metros inv\u00e1lidos");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1183 l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1184 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrador</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1185 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Apenas local","Apenas rede","Todos (Local e Rede)"];
@@ -1194,8 +1197,8 @@ c3.value="Come\u00e7ar captura"}}function terminal_FileSelectHandler(b){haltEven
1197 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1198 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1199 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1197 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1198 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1200 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1201 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1202 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1203 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1204 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1206,14 +1209,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1209 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1210 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1211 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Conectar":"desconectar";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","The device indicated that this type of connection of not supported."):
1209 -5E4==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1210 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configura\u00e7\u00f5es da \u00e1rea de trabalho remota",3,showDesktopSettingsChanged))}
1212 +5E4==b.disconnectCode?messagebox("\u00c1rea de trabalho remota","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u00c1rea de trabalho remota","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1213 +break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1214 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Configura\u00e7\u00f5es da \u00e1rea de trabalho remota",3,showDesktopSettingsChanged))}
1215 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1216 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1213 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1214 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1215 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1216 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1217 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1218 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1219 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1220 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1221 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1222 "8px"),center()))}
1223 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Entrada remota do teclado",3,showDeskTypeEx,'<div>Digite o texto e clique em OK para digit\u00e1-lo remotamente usando um teclado em ingl\u00eas dos EUA. Certifique-se de colocar o cursor remoto na posi\u00e7\u00e3o correta antes de continuar.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1224,13 +1228,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1228 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1229 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1230 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1227 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1231 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1232 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1233 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1234 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1231 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Raiz</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1232 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1233 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1235 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Raiz</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1236 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1237 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1238 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1239 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1240 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1353,10 +1357,9 @@ b&1&&addOption("d5actionSelect","Redefinir para diagn\u00f3stico",301));9<amtver
1357 5<amtversion&&addOption("d5actionSelect","Consentimento do usu\u00e1rio ...",998);setDialogMode(5,"A\u00e7\u00f5es de poder",3,powerActionDlgCheck)}else messagebox("A\u00e7\u00e3o de poder",format("N\u00e3o foi poss\u00edvel obter os recursos do sistema, erro {0}",d))}
1358 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"A\u00e7\u00e3o de energia conclu\u00edda."):QH(60,format("Erro de a\u00e7\u00e3o de energia # {0}.",e));setDialogMode(1,"A\u00e7\u00e3o de poder",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirmar a execu\u00e7\u00e3o do Intel&reg; Remote Secure Erase?<br>Digite a senha de Exclus\u00e3o segura, se necess\u00e1rio.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Senha</div></div><br><div style=color:red><b> AVISO: </b> Isso limpar\u00e1 os dados no sistema remoto.</div>",
1359 rsepass=1,setDialogMode(11,"A\u00e7\u00f5es de poder",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1356 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVISO: </b> Isso limpar\u00e1 os dados no sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1357 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1358 -a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"A\u00e7\u00f5es de poder",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1359 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1360 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> AVISO: </b> Isso limpar\u00e1 os dados no sistema remoto.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1361 +d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1362 +"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"A\u00e7\u00f5es de poder",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1363 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("A\u00e7\u00e3o de poder","Verificando estado ..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1364 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("A\u00e7\u00e3o de poder","Verificando estado ...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&
1365 10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1391,10 +1394,10 @@ function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"A\u00e7\u00e3o de energia
1394 function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1395 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1396 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1394 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1395 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar o armazenamento Intel&reg; AMT para este computador.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+
1396 -" / "+p):e+"Raiz";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Baixar","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",
1397 -function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Nenhum arquivo encontrado.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Envio...","UploadToStorage()"):
1397 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1398 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar o armazenamento Intel&reg; AMT para este computador.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+
1399 +" / "+q):e+"Raiz";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Baixar","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",
1400 +function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>Nenhum arquivo encontrado.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Envio...","UploadToStorage()"):
1401 ""));QH(55,a)}else QH(55,"N\u00e3o foi poss\u00edvel carregar os dados de armazenamento ...<br/>"+AddButton("Atualizar","PullStorage()"))}
1402 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Fornecedor",b));""!=c&&(e+=addHtmlValue("Inscri\u00e7\u00e3o",c));e+=addHtmlValue("Nome",a);e+=addHtmlValue("Tamanho",v.size+" bytes");v.link&&(e+=addHtmlValue("Liga\u00e7\u00e3o",v.link));setDialogMode(11,"Item de armazenamento",5,showStorageDetailsEx,e,d)}}
1403 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("Armazenamento",format("N\u00e3o foi poss\u00edvel excluir o arquivo (ERR {0}), verifique se o computador est\u00e1 ligado.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}
@@ -1409,7 +1412,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1412 b}
1413 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1414 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1412 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dias").replace("H"," horas").replace("M"," minutos");b=b.replace(" 1 dia"," 1 dia").replace(" 1 hora"," 1 hora").replace(" 1 minuto"," 1 minuto");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1415 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," dias").replace("H"," horas").replace("M"," minutos");b=b.replace(" 1 dia"," 1 dia").replace(" 1 hora"," 1 hora").replace(" 1 minuto "," 1 minuto ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1416 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Gerenciar alarmes de ativa\u00e7\u00e3o.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, acordar em "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u00e0s"),void 0!=d[c].Interval&&(a+=" e cada"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+=", exclua quando terminar"),
1417 b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("Editar...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>Nenhum alarme de ativa\u00e7\u00e3o registrado.</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&(d+=AddButton("Remova todos os alarmes","RemoveAllAlarms()")+
1418 AddButton("Adicionar","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander-ru.htm
+634 -632
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="ru" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Connect onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Состояние системы</a><p id=go14 class=nav1 onclick=go(14)><a>Удаленный рабочий стол</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>файлы</a><p id=go13 class=nav1 onclick=go(13)><a>Последовательная по локальной сети</a><p id=go2 class=nav1 onclick=go(2)><a>Информация оборудовании</a><p id=go6 class=nav1 onclick=go(6)><a>Журнал событий</a><p id=go15 class=nav1 onclick=go(15)><a>Аудит Журнал</a><p id=go21 class=nav1 onclick=go(21)><a>Место хранения</a><p id=go8 class=nav1 onclick=go(8)><a>Сетевые настройки</a><p id=go17 class=nav1 onclick=go(17)><a>Настройки интернета</a><p id=go16 class=nav1 onclick=go(16)><a>Настройки безопасности</a><p id=go19 class=nav1 onclick=go(19)><a>Присутствие агента</a><p id=go18 class=nav1 onclick=go(18)><a>Защита системы</a><p id=go11 class=nav1 onclick=go(11)><a>Учетные записи пользователей</a><p id=go22 class=nav1 onclick=go(22)><a>Подписки</a><p id=go23 class=nav1 onclick=go(23)><a>Будильник</a><p id=go12 class=nav1 onclick=go(12)><a>Браузер WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Карта диска" onclick=iderToggleDiskMap()><input type=button value="Остановить сеанс IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Флоппи, блоки по 512 байт.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, блоки по 2048 байт.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Прошивка этого компьютера должна быть обновлена,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>пожалуйста, проверьте здесь</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Loading ...</h1></div><div id=p1 style=display:none><h1>Состояние системы</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Информация оборудовании</h1><span id=16></span></div><div id=p6 style=display:none><h1>Журнал событий</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Сетевые настройки</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Учетные записи пользователей</h1><span id=21></span></div><div id=p12 style=display:none><h1>Браузер WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=запрос style=margin:4px onclick=wsmanQuery()><input type=button value=Очистить style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Фильтр style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Последовательный терминал через локальную сеть</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция Serial-over-LAN отключена<span id=26>Нажмите здесь, чтобы включить его.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Начать захват" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Отключен.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Переключить то, что отправит ключ возврата" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Размер терминала переключения" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Переключить тип эмуляции клавиш F1 - F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Расширенные Ascii" title="Тип эмуляции терминала" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>возврат на одну позицию<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Вставить disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Удаленный рабочий стол</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция KVM отключены<span id=37>Нажмите здесь, чтобы включить его.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Повернуть налево" onclick=drotate(-1)>↺</div><div class=rb title="Повернуть вправо" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Переключить полноэкранный режим" onkeypress="return false" onkeydown="return false" value=Полный onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Сохранить скриншот удаленного рабочего стола" onkeypress="return false" onkeydown="return false" value=Сохранить... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Настройки ..." title="Изменить настройки удаленного рабочего стола" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Изменить состояние питания удаленного компьютера" onkeypress="return false" onkeydown="return false" value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Отключен.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Выиграть<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + М<option value=20>Win + R<option value=23>Win + Left<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Тип onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Пустой экран&nbsp;</span><span id=47><input id=48 type=checkbox>Только просмотр&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Аудит Журнал</h1><span id=50></span></div><div id=p16 style=display:none><h1>Настройки безопасности</h1><span id=51></span></div><div id=p17 style=display:none><h1>Настройки интернета</h1><span id=52></span></div><div id=p18 style=display:none><h1>Защита системы</h1><span id=53></span></div><div id=p19 style=display:none><h1>Присутствие агента</h1><span id=54></span></div><div id=p21 style=display:none><h1>Место хранения</h1><span id=55></span></div><div id=p22 style=display:none><h1>Подписка на события</h1><span id=56></span></div><div id=p23 style=display:none><h1>Будильник</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>файлы</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=вверх>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Выбрать все" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=удалять onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Новая папка" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Загрузить onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Резать onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=копия onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Вставить onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=обновление onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Сортировать по имени<option value=2>Сортировать по размеру<option value=3>Сортировать по дате<option value=4>Спуск по имени<option value=5>Спуск по размеру<option value=6>Сходить по дате</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>имя пользователя</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Пароль*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Подтвердите Пароль</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Местный<option value=1>сеть<option value=2>Любые</select><div>разрешение</div></div><div>Предоставленные разрешения</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Минимум 8 символов с прописными, строчными, 0-9 и одним из! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Действие силы</div></div><div><span style=color:red>Предупреждение:</span>Некоторые действия с питанием могут привести к потере данных и могут отключить сеансы перенаправления рабочего стола, терминала или диска.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Код согласия</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Основной дисплей<option value=1>Вторичный дисплей<option id=d6ThirdDisplay value=2 style=display:none>Третий дисплей</select><div>Согласие Дисплей</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Кодировка изображения</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Показать локальный курсор мыши</label><br><label><input type=checkbox id=d7showcad>Показать Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Ограничить частоту кадров</label><br><label><input type=checkbox id=d7noMouseRotate>Не вращайте мышь</label><br></div><div>Другие настройки</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Программное обеспечение KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Качественный</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>пересчет</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=админ style=float:right;width:220px><div style=height:20px>имя пользователя</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>пароль</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Порт перенаправления</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Перенаправление<br></label><label style=display:block><input type=checkbox id=c18>Последовательная по локальной сети<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Не требуется<br></label><label><input type=radio name=d10 id=c20 value=1>Требуется только для KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Всегда требуется<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">Имя профиля</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>приоритет</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Аутентификация</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Никто</select><div>шифрование</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Пароль*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Подтвердите Пароль</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Это сохранит все состояние Intel® AMT для этого компьютера в файл. Пароли не будут сохранены, но некоторые конфиденциальные данные могут быть включены.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Отключено<br><input type=radio name=d20 id=d20b value=1>ICMP-ответ<br><input type=radio name=d20 id=d20c value=2>Ответ RMCP<br><input type=radio name=d20 id=d20d value=3>ICMP и RMCP ответ<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Синхронизация IP-адреса операционной системы</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>айпи адрес</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Метка подсети</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>шлюз</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Основной DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Альтернативный DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Отключено<option value=1>Отключено, обновление DHCP<option value=2>Включено</select><div>Динамический DNS-клиент</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Интервал обновления (минуты)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (секунды)</div></div><div style=font-size:10px><br>Интервал по умолчанию составляет 1440 минут, TTL по умолчанию - 900 секунд.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Включите<option value=10>Сброс<option value=5>Силовой цикл<option value=8>Выключить<option id=d24p500 value=500>OS Wake из режима ожидания<option id=d24p501 value=501>ОС энергосбережения<option value=999>Установить параметры загрузки</select><div>Дистанционное управление</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Обеспечить безопасную загрузку</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Настройка биоса</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Форсировать события</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Блокировка кнопки питания</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Кнопка сброса блокировки</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Кнопка блокировки сна</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Блокировка клавиатуры</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Обход пароля BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Перепрошить биос</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Безопасный режим</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Используйте IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Последовательная по локальной сети</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Настройки загрузки</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Никто<option id=ForceDVDBootOption value=1>Force CD / DVD Boot<option id=ForcePXEBootOption value=2>Force PXE Boot<option id=ForceHDBootOption value=3>Принудительная загрузка жесткого диска<option id=ForceDiagBootOption value=4>Принудительный диагностический ботинок</select><div>Загрузочный источник</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Никто<option value=1>Индекс 1<option value=2>Индекс 2<option value=3>Индекс 3<option value=3>Индекс 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Загрузиться с дискеты<option value=1>Загрузиться с CDROM</select><div>Загрузочное устройство IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Системные установки по умолчанию<option id=c46 value=1>Тихо<option id=c47 value=2>Подробный<option id=c48 value=3>Пустой экран</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Пароль RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Название тревоги</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Дата пробуждения (год-месяц-день)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Время пробуждения (час: мин: сек)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Интервал (дни-часы-минуты)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Держать тревогу<option value=1>Удалить по завершении</select></div><div style=padding-top:4px>После пробуждения</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Включено<br></label><label><input type=radio name=d26b id=c50 value=0>Отключено<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Включено<br></label><label><input type=radio name=d26a id=c52 value=0>Отключено<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Отмена style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=Хорошо style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=удалять style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="ru" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Connect onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>Состояние системы</a><p id=go14 class=nav1 onclick=go(14)><a>Удаленный рабочий стол</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>файлы</a><p id=go13 class=nav1 onclick=go(13)><a>Последовательная по локальной сети</a><p id=go2 class=nav1 onclick=go(2)><a>Информация оборудовании</a><p id=go6 class=nav1 onclick=go(6)><a>Журнал событий</a><p id=go15 class=nav1 onclick=go(15)><a>Аудит Журнал</a><p id=go21 class=nav1 onclick=go(21)><a>Место хранения</a><p id=go8 class=nav1 onclick=go(8)><a>Сетевые настройки</a><p id=go17 class=nav1 onclick=go(17)><a>Настройки интернета</a><p id=go16 class=nav1 onclick=go(16)><a>Настройки безопасности</a><p id=go19 class=nav1 onclick=go(19)><a>Присутствие агента</a><p id=go18 class=nav1 onclick=go(18)><a>Защита системы</a><p id=go11 class=nav1 onclick=go(11)><a>Учетные записи пользователей</a><p id=go22 class=nav1 onclick=go(22)><a>Подписки</a><p id=go23 class=nav1 onclick=go(23)><a>Будильник</a><p id=go12 class=nav1 onclick=go(12)><a>Браузер WSMAN</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Карта диска" onclick=iderToggleDiskMap()><input type=button value="Остановить сеанс IDE-R" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Флоппи, блоки по 512 байт.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, блоки по 2048 байт.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>Прошивка этого компьютера должна быть обновлена,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>пожалуйста, проверьте здесь</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Loading ...</h1></div><div id=p1 style=display:none><h1>Состояние системы</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Информация оборудовании</h1><span id=16></span></div><div id=p6 style=display:none><h1>Журнал событий</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Сетевые настройки</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>Учетные записи пользователей</h1><span id=21></span></div><div id=p12 style=display:none><h1>Браузер WSMAN</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=запрос style=margin:4px onclick=wsmanQuery()><input type=button value=Очистить style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Фильтр style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Последовательный терминал через локальную сеть</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция Serial-over-LAN отключена<span id=26>Нажмите здесь, чтобы включить его.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Начать захват" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Отключен.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR + LF" title="Переключить то, что отправит ключ возврата" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Размер терминала переключения" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC + [OM)" title="Переключить тип эмуляции клавиш F1 - F10" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Расширенные Ascii" title="Тип эмуляции терминала" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>возврат на одну позицию<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Вставить disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Удаленный рабочий стол</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Порт перенаправления Intel® AMT или функция KVM отключены<span id=37>Нажмите здесь, чтобы включить его.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Удаленный компьютер не включен, нажмите здесь, чтобы выдать команду питания.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Повернуть налево" onclick=drotate(-1)>↺</div><div class=rb title="Повернуть вправо" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Переключить полноэкранный режим" onkeypress="return false" onkeydown="return false" value=Полный onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Сохранить скриншот удаленного рабочего стола" onkeypress="return false" onkeydown="return false" value=Сохранить... onclick=deskSaveImage() style=margin-right:3px><input type=button value="Настройки ..." title="Изменить настройки удаленного рабочего стола" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Начать операцию удаленного монтирования диска" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Изменить состояние питания удаленного компьютера" onkeypress="return false" onkeydown="return false" value="Силовые действия ..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Отключен.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Выиграть<option value=1>Win + Down<option value=2>Win + Up<option value=3>Win + L<option value=4>Win + М<option value=20>Win + R<option value=23>Win + Left<option value=24>Win + Right<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=послать onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Тип onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Пустой экран&nbsp;</span><span id=47><input id=48 type=checkbox>Только просмотр&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Аудит Журнал</h1><span id=50></span></div><div id=p16 style=display:none><h1>Настройки безопасности</h1><span id=51></span></div><div id=p17 style=display:none><h1>Настройки интернета</h1><span id=52></span></div><div id=p18 style=display:none><h1>Защита системы</h1><span id=53></span></div><div id=p19 style=display:none><h1>Присутствие агента</h1><span id=54></span></div><div id=p21 style=display:none><h1>Место хранения</h1><span id=55></span></div><div id=p22 style=display:none><h1>Подписка на события</h1><span id=56></span></div><div id=p23 style=display:none><h1>Будильник</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>файлы</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=вверх>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Выбрать все" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=удалять onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="Новая папка" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Загрузить onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Резать onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=копия onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Вставить onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=обновление onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Сортировать по имени<option value=2>Сортировать по размеру<option value=3>Сортировать по дате<option value=4>Спуск по имени<option value=5>Спуск по размеру<option value=6>Сходить по дате</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>имя пользователя</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Пароль*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Подтвердите Пароль</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Местный<option value=1>сеть<option value=2>Любые</select><div>разрешение</div></div><div>Предоставленные разрешения</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>* Минимум 8 символов с прописными, строчными, 0-9 и одним из! @ # $% ^ &amp; * () + -</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Действие силы</div></div><div><span style=color:red>Предупреждение:</span>Некоторые действия с питанием могут привести к потере данных и могут отключить сеансы перенаправления рабочего стола, терминала или диска.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Код согласия</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Основной дисплей<option value=1>Вторичный дисплей<option id=d6ThirdDisplay value=2 style=display:none>Третий дисплей</select><div>Согласие Дисплей</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Кодировка изображения</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Отключено<option value=2>Automatic<option value=3>Включено</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Показать локальный курсор мыши</label><br><label><input type=checkbox id=d7showcad>Показать Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Ограничить частоту кадров</label><br><label><input type=checkbox id=d7noMouseRotate>Не вращайте мышь</label><br></div><div>Другие настройки</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Программное обеспечение KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Качественный</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87,5%<option value=768>75%<option value=640>62,5%<option value=512>50%<option value=384>37,5%<option value=256>25%<option value=128>12,5%</select><div style=height:20px>пересчет</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=админ style=float:right;width:220px><div style=height:20px>имя пользователя</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>пароль</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Порт перенаправления</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Перенаправление<br></label><label style=display:block><input type=checkbox id=c18>Последовательная по локальной сети<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Не требуется<br></label><label><input type=radio name=d10 id=c20 value=1>Требуется только для KVM<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Всегда требуется<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">Имя профиля</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Максимум 32 символа"><div title="Максимум 32 символа">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>приоритет</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Аутентификация</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>Никто</select><div>шифрование</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Пароль*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Длина от 8 до 63 символов"><div title="Длина от 8 до 63 символов">Подтвердите Пароль</div></div></div><div id=dialog19 style=margin:auto;margin:3px>Это сохранит все состояние Intel® AMT для этого компьютера в файл. Пароли не будут сохранены, но некоторые конфиденциальные данные могут быть включены.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Отключено<br><input type=radio name=d20 id=d20b value=1>ICMP-ответ<br><input type=radio name=d20 id=d20c value=2>Ответ RMCP<br><input type=radio name=d20 id=d20d value=3>ICMP и RMCP ответ<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Синхронизация IP-адреса операционной системы</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>айпи адрес</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Метка подсети</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>шлюз</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Основной DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Альтернативный DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Отключено<option value=1>Отключено, обновление DHCP<option value=2>Включено</select><div>Динамический DNS-клиент</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Интервал обновления (минуты)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (секунды)</div></div><div style=font-size:10px><br>Интервал по умолчанию составляет 1440 минут, TTL по умолчанию - 900 секунд.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Включите<option value=10>Сброс<option value=5>Силовой цикл<option value=8>Выключить<option id=d24p500 value=500>OS Wake из режима ожидания<option id=d24p501 value=501>ОС энергосбережения<option value=999>Установить параметры загрузки</select><div>Дистанционное управление</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Обеспечить безопасную загрузку</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>Настройка биоса</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Форсировать события</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Блокировка кнопки питания</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Кнопка сброса блокировки</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Кнопка блокировки сна</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Блокировка клавиатуры</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>Обход пароля BIOS</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Перепрошить биос</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Безопасный режим</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Используйте IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Последовательная по локальной сети</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel® Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>Настройки загрузки</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Никто<option id=ForceDVDBootOption value=1>Force CD / DVD Boot<option id=ForcePXEBootOption value=2>Force PXE Boot<option id=ForceHDBootOption value=3>Принудительная загрузка жесткого диска<option id=ForceDiagBootOption value=4>Принудительный диагностический ботинок</select><div>Загрузочный источник</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Никто<option value=1>Индекс 1<option value=2>Индекс 2<option value=3>Индекс 3<option value=3>Индекс 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Загрузиться с дискеты<option value=1>Загрузиться с CDROM</select><div>Загрузочное устройство IDER</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Системные установки по умолчанию<option id=c46 value=1>Тихо<option id=c47 value=2>Подробный<option id=c48 value=3>Пустой экран</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>Пароль RSE</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Название тревоги</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Дата пробуждения (год-месяц-день)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Время пробуждения (час: мин: сек)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Интервал (дни-часы-минуты)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Держать тревогу<option value=1>Удалить по завершении</select></div><div style=padding-top:4px>После пробуждения</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Включено<br></label><label><input type=radio name=d26b id=c50 value=0>Отключено<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Включено<br></label><label><input type=radio name=d26a id=c52 value=0>Отключено<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Отмена style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=Хорошо style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=удалять style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,85 +12,85 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435";
91 -if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",
92 -g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";
93 -if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u0410\u0433\u0435\u043d\u0442 \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043d\u0430"+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u0421\u043b\u0443\u0447\u0430\u0439 \u0432\u0442\u043e\u0440\u0436\u0435\u043d\u0438\u044f";
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435";
91 +if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",
92 +h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";
93 +if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==a&&170==c[0])return"\u0410\u0433\u0435\u043d\u0442 \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439"+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u043d\u0430"+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"\u0421\u043b\u0443\u0447\u0430\u0439 \u0432\u0442\u043e\u0440\u0436\u0435\u043d\u0438\u044f";
94 if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0430\u043d\u0441 Serial Over LAN \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.";if(1==c[2])return"\u0421\u0435\u0430\u043d\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0431\u044b\u043b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.";
95 if(2==c[2])return"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0430\u043d\u0441 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f IDE \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d.";if(3==c[2])return"\u0421\u0435\u0430\u043d\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f IDE \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0431\u044b\u043b \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d."}if(36==
96 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f"),4294967293==a?"\u0424\u0438\u043b\u044c\u0442\u0440 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d"+b+" \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441.":4294967292==a?"\u0424\u0438\u043b\u044c\u0442\u0440 \u0432\u0441\u0435\u0445 \u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d"+
@@ -101,71 +101,71 @@ if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"\u041f\u043e\u043b\u0
101 if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"\u041e\u0448\u0438\u0431\u043a\u0430 HWA: \u043e\u0431\u0449\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430"}return 6==a?"\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438"+(c[1]+(c[2]<<8))+" \u0440\u0430\u0437. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u043d\u0430.":30==a?"\u041d\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0433\u043e \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044f":
102 32==a?"\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438\u043b\u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f":35==a?64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b":
103 37==a?"\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 (\u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e).":"\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u0434\u0430\u0442\u0447\u0438\u043a\u0430 #"+
104 -a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),
105 -b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>\u041c\u0435\u0441\u0442\u043d\u044b\u0439</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \u043f\u043e\u0440\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));C+=4;b.MCLocationType=a.charCodeAt(C++);
106 -e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=[];h.PendingBatchOperations=0;
107 -h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,x,g,k){c();b(h,a,g,k,p)},
108 -0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),
109 -b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};
110 -h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==a.indexOf("AMT_"))return h.pfx[0]+a;if(0==
111 -a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
112 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
113 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
114 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
115 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
116 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
117 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
118 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
119 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
120 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
121 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
122 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
123 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
124 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
125 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
126 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
127 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
128 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
129 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
130 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
131 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
132 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
133 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
134 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
135 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
136 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
137 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
138 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
139 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
140 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
141 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
142 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
143 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
144 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
145 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
146 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
147 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
148 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
149 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
150 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
151 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
152 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
153 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
154 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
155 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
156 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
157 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
158 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
104 +a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),
105 +b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>\u041c\u0435\u0441\u0442\u043d\u044b\u0439</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM \u043f\u043e\u0440\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));h+=4;b.MCLocationType=a.charCodeAt(h++);
106 +u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=[];g.PendingBatchOperations=0;
107 +g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,y,h,k){c();b(g,a,h,k,q)},
108 +0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),
109 +b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};
110 +g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==a.indexOf("AMT_"))return g.pfx[0]+a;if(0==
111 +a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
112 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
113 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
114 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
115 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
116 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
117 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
118 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
119 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
120 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
121 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
122 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
123 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
124 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
125 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
126 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
127 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
128 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
129 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
130 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
131 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
132 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
133 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
134 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
135 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
136 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
137 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
138 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
139 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
140 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
141 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
142 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
143 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
144 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
145 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
146 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
147 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
148 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
149 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
150 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
151 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
152 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
153 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
154 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
155 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
156 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
157 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
158 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
159 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
160 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
161 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
162 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
163 -[a,b,[]])};var E="\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e. ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u200b\u200b\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. ; \u041d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u043e \u0432\u0441\u0435\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u043b \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 / \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 ATAPI / IDE. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u0434\u0438\u0441\u043a\u0435\u0442\u0430 \u0421\u0431\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 PS / 2 \u0438\u043b\u0438 USB-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b. ; \u0421\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432\u0438\u0434\u0435\u043e. ; \u041d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u043e\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. ; \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (BIOS) \u041f\u0417\u0423. ; \u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e) ; \u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430".split(";"),
164 -m="\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e. ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438. ; \u0417\u0430\u043f\u0443\u0441\u043a \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0442\u043e\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (\u043e\u0432) ; \u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ; \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c ; \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 USB ; \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 PCI ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u041f\u0417\u0423 ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0438\u0434\u0435\u043e ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u044d\u0448\u0430 ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u044d\u0448\u0430 ; SM \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0448\u0438\u043d\u044b ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 / \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ; \u041f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u043a-\u0441\u0442\u0430\u043d\u0446\u0438\u0438 ; \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043a-\u0441\u0442\u0430\u043d\u0446\u0438\u0438 ; \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043a-\u0441\u0442\u0430\u043d\u0446\u0438\u0438 ; \u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043a-\u0441\u0442\u0430\u043d\u0446\u0438\u0438 ; \u0412\u0435\u043a\u0442\u043e\u0440 \u0432\u044b\u0437\u043e\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b ; \u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u0438\u043b\u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u043d\u0441\u043a\u043e\u0439 \u043f\u043b\u0430\u0442\u044b ; \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043e ; \u0424\u043b\u043e\u043f\u043f\u0438-\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f ; \u0422\u0435\u0441\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b ; \u0422\u0435\u0441\u0442 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 ; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430".split(";"),
162 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
163 +[a,b,[]])};var D="\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e. ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u0430\u043c\u044f\u0442\u044c \u0444\u0438\u0437\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u200b\u200b\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. ; \u041d\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0432\u043e \u0432\u0441\u0435\u0439 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u0435\u043b \u043d\u0435\u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 / \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 ATAPI / IDE. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u044b\u0439 \u0441\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u0434\u0438\u0441\u043a\u0435\u0442\u0430 \u0421\u0431\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 PS / 2 \u0438\u043b\u0438 USB-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b. ; \u0421\u044a\u0435\u043c\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u044b\u0439 \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. ; \u041d\u0435\u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043c\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432\u0438\u0434\u0435\u043e. ; \u041d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u0432\u0438\u0434\u0435\u043e\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. ; \u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b (BIOS) \u041f\u0417\u0423. ; \u041d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 (\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e) ; \u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430".split(";"),
164 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
165 k="\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e ; \u0414\u0440\u0443\u0433\u043e\u0435 ; \u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e ; \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 ; \u0414\u0438\u0441\u043a ; \u041f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 ; \u041c\u043e\u0434\u0443\u043b\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 ; \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0430\u043c\u044f\u0442\u0438 ; \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 ; \u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043b\u0430\u0442\u0443 ; \u041f\u043b\u0430\u0442\u0430 \u043f\u0435\u0440\u0435\u0434\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 ; \u041f\u043b\u0430\u0442\u0430 \u0437\u0430\u0434\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 ; \u041f\u043b\u0430\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u0417\u0430\u0434\u043d\u044f\u044f \u043f\u0430\u043d\u0435\u043b\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0430 ; \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u043f\u043b\u0430\u0442\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u043b\u0430\u0442\u0430 ; \u0414\u0440\u0443\u0433\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 ; \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 ; \u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u0411\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f ; \u041f\u043b\u0430\u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u0435\u043c ; \u041f\u043b\u0430\u0442\u0430 \u0437\u0430\u0434\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438 \u0448\u0430\u0441\u0441\u0438 ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0435 \u0448\u0430\u0441\u0441\u0438 ; \u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0448\u0430\u0441\u0441\u0438 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u043e\u0432\u043e\u0434\u0430 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u0434\u0438\u0441\u043a\u043e\u0432 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0439\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 ; \u041e\u0442\u0441\u0435\u043a \u0434\u043b\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 ; \u0412\u0435\u043d\u0442\u0438\u043b\u044f\u0442\u043e\u0440\u043d\u043e\u0435 \u043e\u0445\u043b\u0430\u0436\u0434\u0435\u043d\u0438\u0435 ; \u0411\u043b\u043e\u043a \u043e\u0445\u043b\u0430\u0436\u0434\u0435\u043d\u0438\u044f ; \u041a\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 ; \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 ; \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 ; BIOS ; Intel (r) ME ; \u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0448\u0438\u043d\u0430 ; \u0413\u0440\u0443\u043f\u043f\u0430 ; Intel (r) ME ; \u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0440\u0435\u0434\u0430 ; \u0411\u0430\u0442\u0430\u0440\u0435\u044f ; \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0431\u043b\u0435\u0439\u0434 ; \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f ; \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 / \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0430\u043c\u044f\u0442\u0438 ; \u041c\u043e\u0434\u0443\u043b\u044c \u0432\u0432\u043e\u0434\u0430 / \u0432\u044b\u0432\u043e\u0434\u0430 ; \u041c\u043e\u0434\u0443\u043b\u044c \u0432\u0432\u043e\u0434\u0430 / \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 ; \u041f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f ; \u041a\u0430\u043d\u0430\u043b IPMI ; \u0428\u0438\u043d\u0430 PCI ; \u0428\u0438\u043d\u0430 PCI Express ; \u0428\u0438\u043d\u0430 SCSI ; \u0428\u0438\u043d\u0430 SATA / SAS ; \u0428\u0438\u043d\u0430 \u043b\u0438\u0446\u0435\u0432\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430".split(";");
166 -h.RealmNames=";; \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ;; \u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ; \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 ; \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ; \u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c ; \u0412\u0440\u0435\u043c\u044f \u0441\u0435\u0442\u0438 ; \u041e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f ; \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 ; EIT ; LocalUN ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 Admin ; \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 ; \u041e\u0431\u043b\u0430\u0441\u0442\u044c ACL ;;; \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430".split(";");
167 -h.WatchdogCurrentStates={1:"\u041d\u0435 \u043d\u0430\u0447\u0430\u0442\u043e",2:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f",4:"\u0411\u0435\u0433",8:"\u0418\u0441\u0442\u0435\u043a\u0448\u0438\u0439",16:"\u043f\u043e\u0434\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
168 -u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",17:"RCO",18:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f",
166 +g.RealmNames=";; \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ;; \u0410\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 ; \u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 ; \u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ; \u041c\u0435\u0441\u0442\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0423\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0430\u0433\u0435\u043d\u0442\u0430 ; \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c ; \u0412\u0440\u0435\u043c\u044f \u0441\u0435\u0442\u0438 ; \u041e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f ; \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 ; EIT ; LocalUN ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 ; \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 Admin ; \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 ; \u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 ; \u041e\u0431\u043b\u0430\u0441\u0442\u044c ACL ;;; \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430".split(";");
167 +g.WatchdogCurrentStates={1:"\u041d\u0435 \u043d\u0430\u0447\u0430\u0442\u043e",2:"\u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f",4:"\u0411\u0435\u0433",8:"\u0418\u0441\u0442\u0435\u043a\u0448\u0438\u0439",16:"\u043f\u043e\u0434\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
168 +u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",17:"RCO",18:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f",
169 19:"\u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438",20:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",21:"\u0421\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f",22:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0435\u0442\u0438",
170 23:"\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",24:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u043e \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u044f\u043c",25:"\u041c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044f",
171 26:"\u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u0432",27:"\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438",28:"EAC",29:"KVM",30:"\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0443\u0447\u0430\u0441\u0442\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
@@ -175,38 +175,39 @@ u=";No network connection available;Name resolution of URI failed;Connect to URI
175 1611:"\u0423\u0434\u0430\u043b\u0435\u043d \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 TLS",1612:"\u041d\u0430\u0431\u043e\u0440 \u043e\u0431\u0449\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 TLS",1613:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Kerberos \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b",1614:"\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043b\u044e\u0447 Kerberos \u0438\u0437\u043c\u0435\u043d\u0435\u043d",
176 1615:"\u0421\u0431\u0440\u043e\u0441 \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432",1616:"\u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u043b\u043e\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f",1617:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u0438",
177 1618:"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0434\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430",1619:"Unprovisioning \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c",1700:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e Power Up",1701:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e Power Down",1702:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u043b\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b",
178 -1703:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0421\u0431\u0440\u043e\u0441",1704:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438",1800:"\u041e\u0442\u043a\u0440\u044b\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044f IDER",1801:"\u0421\u0435\u0441\u0441\u0438\u044f IDER \u0437\u0430\u043a\u0440\u044b\u0442\u0430",1802:"IDER \u0432\u043a\u043b\u044e\u0447\u0435\u043d",1803:"IDER \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",
179 -1804:"\u041e\u0442\u043a\u0440\u044b\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044f SoL",1805:"SoL \u0441\u0435\u0441\u0441\u0438\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u0430",1806:"SoL \u0432\u043a\u043b\u044e\u0447\u0435\u043d",1807:"SoL \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",1808:"\u0421\u0435\u0441\u0441\u0438\u044f KVM \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c",1809:"\u0421\u0435\u0430\u043d\u0441 KVM \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d",1810:"KVM \u0432\u043a\u043b\u044e\u0447\u0435\u043d",
180 -1811:"KVM \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",1812:"\u041f\u0430\u0440\u043e\u043b\u044c VNC \u043d\u0435 \u0443\u0434\u0430\u043b\u0441\u044f 3 \u0440\u0430\u0437\u0430",1900:"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438",1901:"\u041e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438",2E3:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0447\u0438\u0449\u0435\u043d",
181 -2001:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",2002:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",2003:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d",
182 -2004:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",2005:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d",2100:"\u041d\u0430\u0431\u043e\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 Intel&reg; ME",
183 -2200:"\u041d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 TCPIP",2201:"\u0418\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e",2202:"\u041d\u0430\u0431\u043e\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d",2203:"\u041d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 VLAN",2204:"\u041d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0441\u0441\u044b\u043b\u043e\u043a",
184 -2205:"\u041d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 IPv6",2300:"\u041d\u0430\u0431\u043e\u0440 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",2301:"\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 EACL \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043e",2302:"\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 FPACL \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043e",
185 -2303:"\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435",2400:"\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e",2401:"\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0438\u0441\u0430\u043d\u043e",2402:"\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0447\u0438\u0449\u0435\u043d",
186 -2403:"\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d",2500:"CB \u0444\u0438\u043b\u044c\u0442\u0440 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d",2501:"\u0424\u0438\u043b\u044c\u0442\u0440 CB \u0443\u0434\u0430\u043b\u0435\u043d",2502:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u200b\u200b\u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 CB",2503:"\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 CB \u0443\u0434\u0430\u043b\u0435\u043d\u0430",
187 -2504:"\u041d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0438\u0442\u0438\u043a CB \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439 \u0430\u0433\u0435\u043d\u0442",2601:"Agent Watchdog \u0443\u0434\u0430\u043b\u0435\u043d",2602:"\u041d\u0430\u0431\u043e\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430",
188 -2700:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c",2701:"\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0443\u0434\u0430\u043b\u0435\u043d",2702:"\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d",
189 -2800:"EAC \u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e",2801:"EAC \u0432\u043a\u043b\u044e\u0447\u0435\u043d",2802:"EAC \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",2803:"\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0441\u0430\u043d\u043a\u0438 EAC",2804:"\u041e\u043f\u0446\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 EAC",2900:"\u041e\u043f\u0446\u0438\u044f KVM \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430",
190 -2901:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 KVM \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",2902:"\u041f\u0430\u0440\u043e\u043b\u044c KVM \u0438\u0437\u043c\u0435\u043d\u0435\u043d",2903:"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 KVM \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e",2904:"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 KVM \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c",3E3:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f",
191 -3001:"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u0421\u043e\u0431\u044b\u0442\u0438\u0435",3002:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?
192 -b.substring(3):null;if(1605==a)return["\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ME","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0443\u043b\u044c\u0442"+
193 -["NOAUTH","ServerAuth","\u0432\u0437\u0430\u0438\u043c\u043e\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438"][b.charCodeAt(0)]+", \u041c\u0435\u0441\u0442\u043d\u044b\u0439"+["NOAUTH","ServerAuth","\u0432\u0437\u0430\u0438\u043c\u043e\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+","+["NOAUTH","Auth","\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\u041c\u0435\u0441\u0442\u043d\u044b\u0439 \u041c\u042d\u0418",
194 -"\u041c\u0435\u0441\u0442\u043d\u044b\u0439 WSMAN","\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 WSAMN"][b.charCodeAt(0)]:1900==a?"\u041e\u0442"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u0432"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\u041e\u0442"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(0)]+
195 -" \u0432"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(1)]:3001==a?["\u0443\u0441\u043f\u0435\u0445","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c 3 \u0440\u0430\u0437\u0430"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
196 -function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
178 +1703:"\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0421\u0431\u0440\u043e\u0441",1704:"\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"\u041e\u0442\u043a\u0440\u044b\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044f IDER",
179 +1801:"\u0421\u0435\u0441\u0441\u0438\u044f IDER \u0437\u0430\u043a\u0440\u044b\u0442\u0430",1802:"IDER \u0432\u043a\u043b\u044e\u0447\u0435\u043d",1803:"IDER \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",1804:"\u041e\u0442\u043a\u0440\u044b\u0442\u0430 \u0441\u0435\u0441\u0441\u0438\u044f SoL",1805:"SoL \u0441\u0435\u0441\u0441\u0438\u044f \u0437\u0430\u043a\u0440\u044b\u0442\u0430",1806:"SoL \u0432\u043a\u043b\u044e\u0447\u0435\u043d",1807:"SoL \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",
180 +1808:"\u0421\u0435\u0441\u0441\u0438\u044f KVM \u043d\u0430\u0447\u0430\u043b\u0430\u0441\u044c",1809:"\u0421\u0435\u0430\u043d\u0441 KVM \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d",1810:"KVM \u0432\u043a\u043b\u044e\u0447\u0435\u043d",1811:"KVM \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",1812:"\u041f\u0430\u0440\u043e\u043b\u044c VNC \u043d\u0435 \u0443\u0434\u0430\u043b\u0441\u044f 3 \u0440\u0430\u0437\u0430",1900:"\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438",
181 +1901:"\u041e\u0448\u0438\u0431\u043a\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438",2E3:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0447\u0438\u0449\u0435\u043d",2001:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",
182 +2002:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",2003:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d",2004:"\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438",
183 +2005:"\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d",2100:"\u041d\u0430\u0431\u043e\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 Intel&reg; ME",2200:"\u041d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 TCPIP",2201:"\u0418\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e",
184 +2202:"\u041d\u0430\u0431\u043e\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d",2203:"\u041d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 VLAN",2204:"\u041d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0441\u0441\u044b\u043b\u043e\u043a",2205:"\u041d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 IPv6",2300:"\u041d\u0430\u0431\u043e\u0440 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430",
185 +2301:"\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 EACL \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043e",2302:"\u0425\u0440\u0430\u043d\u0435\u043d\u0438\u0435 FPACL \u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043e",2303:"\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435",2400:"\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043e",
186 +2401:"\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0438\u0441\u0430\u043d\u043e",2402:"\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043e\u0447\u0438\u0449\u0435\u043d",2403:"\u0416\u0443\u0440\u043d\u0430\u043b \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0437\u0430\u043c\u043e\u0440\u043e\u0436\u0435\u043d",2500:"CB \u0444\u0438\u043b\u044c\u0442\u0440 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d",2501:"\u0424\u0438\u043b\u044c\u0442\u0440 CB \u0443\u0434\u0430\u043b\u0435\u043d",
187 +2502:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u200b\u200b\u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 CB",2503:"\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 CB \u0443\u0434\u0430\u043b\u0435\u043d\u0430",2504:"\u041d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0438\u0442\u0438\u043a CB \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439 \u0430\u0433\u0435\u043d\u0442",
188 +2601:"Agent Watchdog \u0443\u0434\u0430\u043b\u0435\u043d",2602:"\u041d\u0430\u0431\u043e\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0433\u043e \u0430\u0433\u0435\u043d\u0442\u0430",2700:"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c",2701:"\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0443\u0434\u0430\u043b\u0435\u043d",
189 +2702:"\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",2800:"EAC \u041f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043b\u0438\u0446\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e",
190 +2801:"EAC \u0432\u043a\u043b\u044e\u0447\u0435\u043d",2802:"EAC \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d",2803:"\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0441\u0430\u043d\u043a\u0438 EAC",2804:"\u041e\u043f\u0446\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 EAC",2900:"\u041e\u043f\u0446\u0438\u044f KVM \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430",2901:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 KVM \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",
191 +2902:"\u041f\u0430\u0440\u043e\u043b\u044c KVM \u0438\u0437\u043c\u0435\u043d\u0435\u043d",2903:"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 KVM \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e",2904:"\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 KVM \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c",3E3:"\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f",
192 +3001:"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u044f \u0421\u043e\u0431\u044b\u0442\u0438\u0435",3002:"\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
193 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a ME","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a MEBx"][b.charCodeAt(0)];if(1606==a){var c=["\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(0)];
194 +0==b.charCodeAt(1)&&(c+=","+b.substring(3));return c}return 1607==a?"\u0414\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043f\u0443\u043b\u044c\u0442"+["NOAUTH","ServerAuth","\u0432\u0437\u0430\u0438\u043c\u043e\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438"][b.charCodeAt(0)]+", \u041c\u0435\u0441\u0442\u043d\u044b\u0439"+["NOAUTH","ServerAuth","\u0432\u0437\u0430\u0438\u043c\u043e\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438"][b.charCodeAt(1)]:
195 +1617==a?g.RealmNames[ReadInt(b,0)]+","+["NOAUTH","Auth","\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","\u041c\u0435\u0441\u0442\u043d\u044b\u0439 \u041c\u042d\u0418","\u041c\u0435\u0441\u0442\u043d\u044b\u0439 WSMAN","\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 WSAMN"][b.charCodeAt(0)]:1900==a?"\u041e\u0442"+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" \u0432"+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,
196 +12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"\u041e\u0442"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(0)]+" \u0432"+["\u041d\u0438\u043a\u0442\u043e","KVM","\u0412\u0441\u0435"][b.charCodeAt(1)]:3001==a?["\u0443\u0441\u043f\u0435\u0445","\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c 3 \u0440\u0430\u0437\u0430"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,
197 +p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
198 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
199 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
200 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
201 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
201 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
202 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
203 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
204 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
205 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
206 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
207 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
208 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
209 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
202 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
203 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
204 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
205 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
206 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
207 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
208 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
209 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
210 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
211 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
212 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
213 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -217,10 +218,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
218 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
219 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
220 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
220 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
221 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
222 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
222 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
223 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
223 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
224 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
225 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
226 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
227 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -230,69 +231,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
231 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
232 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
233 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
233 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
234 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
235 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
236 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
237 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
238 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
239 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
240 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
234 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
235 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
236 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
237 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
238 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
239 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
240 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
241 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
242 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
242 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
243 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
244 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
245 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
246 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
247 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
248 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
249 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
250 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
251 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
252 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
253 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
254 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
255 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
243 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
244 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
245 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
246 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
247 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
248 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
249 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
250 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
251 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
252 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
253 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
254 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
255 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
256 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
257 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
258 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
259 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
260 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
260 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
261 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
262 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
261 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
262 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
263 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
264 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
265 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
266 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
267 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
268 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
268 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
269 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
270 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
271 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
272 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
273 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
274 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
275 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
269 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
270 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
271 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
272 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
273 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
274 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
275 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
276 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
277 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
278 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
279 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
279 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
280 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
281 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
282 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
283 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
284 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
285 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
286 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
287 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
288 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
289 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
290 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
291 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
280 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
281 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
282 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
283 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
284 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
285 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
286 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
287 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
288 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
289 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
290 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
291 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
292 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
293 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
293 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
294 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
295 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
294 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
295 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
296 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
297 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
298 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
299 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -306,213 +307,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
307 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
308 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
309 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
309 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
310 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
311 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
311 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
312 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
313 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
314 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
315 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
316 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
317 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
318 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
312 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
313 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
314 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
315 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
316 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
317 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
318 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
319 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
320 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
320 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
321 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
322 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
321 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
322 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
323 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
324 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
325 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
325 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
326 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
327 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
327 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
328 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
329 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
329 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
330 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
331 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
332 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
333 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
334 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
335 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
336 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
337 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
338 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
339 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
340 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
341 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
330 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
331 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
332 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
333 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
334 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
335 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
336 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
337 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
338 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
339 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
340 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
341 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
342 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
343 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
343 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
344 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
345 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
346 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
347 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
348 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
349 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
350 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
351 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
344 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
345 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
346 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
347 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
348 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
349 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
350 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
351 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
352 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
353 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
354 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
355 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
356 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
357 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
358 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
358 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
359 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
360 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
361 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
362 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
363 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
359 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
360 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
361 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
362 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
363 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
364 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
365 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
365 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
366 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
367 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
367 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
368 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
369 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
370 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
371 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
372 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
373 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
374 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
375 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
376 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
368 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
369 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
370 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
371 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
372 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
373 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
374 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
375 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
376 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
377 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
378 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
378 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
379 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
380 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
381 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
382 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
379 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
380 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
381 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
382 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
383 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
384 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
385 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
386 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
386 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
387 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
388 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
389 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
390 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
390 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
391 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
392 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
393 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
394 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
395 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
396 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
391 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
392 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
393 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
394 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
395 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
396 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
397 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
398 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
398 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
399 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
400 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
401 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
402 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
399 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
400 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
401 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
402 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
403 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
404 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
404 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
405 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
406 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
407 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
407 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
408 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
408 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
409 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
410 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
411 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
411 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
412 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
413 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
414 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
412 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
413 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
414 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
415 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
416 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
416 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
417 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
418 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
419 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
417 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
418 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
419 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
420 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
421 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
422 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
423 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
423 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
424 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
425 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
426 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
427 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
428 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
429 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
430 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
431 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
432 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
433 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
434 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
424 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
425 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
426 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
427 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
428 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
429 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
430 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
431 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
432 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
433 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
434 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
435 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
436 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
436 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
437 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
438 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
437 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
438 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
439 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
440 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
440 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
441 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
442 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
443 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
444 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
441 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
442 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
443 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
444 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
445 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
446 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
446 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
447 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
448 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
448 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
449 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
450 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
449 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
450 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
451 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
452 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
452 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
453 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
454 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
455 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
456 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
457 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
458 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
459 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
460 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
461 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
462 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
463 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
464 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
465 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
466 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
467 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
468 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
469 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
470 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
453 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
454 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
455 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
456 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
457 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
458 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
459 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
460 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
461 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
462 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
463 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
464 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
465 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
466 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
467 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
468 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
469 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
470 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
471 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
472 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
472 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
473 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
474 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
474 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
475 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
476 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
477 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
477 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
478 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
479 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
480 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
481 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
482 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
483 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
484 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
485 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
486 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
487 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
488 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
489 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
490 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
491 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
492 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
493 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
478 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
479 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
480 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
481 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
482 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
483 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
484 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
485 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
486 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
487 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
488 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
489 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
490 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
491 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
492 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
493 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
494 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
495 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
496 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
497 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
497 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
498 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
499 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
498 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
499 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
500 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
501 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
501 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
502 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
503 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
504 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
505 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
506 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
507 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
508 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
508 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
509 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
510 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
511 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
509 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
510 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
511 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
512 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
513 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
513 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
514 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
515 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
514 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
515 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
516 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
517 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
518 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
519 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -530,111 +531,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
531 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
532 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
533 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
533 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
534 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
535 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
536 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
534 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
535 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
536 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
537 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
538 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
538 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
539 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
540 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
541 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
542 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
539 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
540 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
541 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
542 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
543 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
544 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
544 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
545 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
546 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
547 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
548 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
548 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
549 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
549 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
550 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
551 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
552 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
553 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
553 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
554 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
555 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
556 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
557 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
558 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
559 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
560 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
560 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
561 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
562 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
562 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
563 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
564 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
565 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
566 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
567 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
568 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
569 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
563 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
564 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
565 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
566 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
567 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
568 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
569 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
570 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
571 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
572 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
572 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
573 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
574 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
574 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
575 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
576 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
576 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
577 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
578 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
579 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
580 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
581 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
582 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
583 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
577 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
578 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
579 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
580 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
581 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
582 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
583 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
584 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
585 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
586 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
586 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
587 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
588 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
589 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
590 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
587 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
588 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
589 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
590 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
591 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
592 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
592 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
593 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
594 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
595 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
596 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
597 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
598 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
599 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
600 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
601 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
602 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
603 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
604 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
605 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
606 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
607 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
593 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
594 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
595 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
596 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
597 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
598 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
599 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
600 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
601 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
602 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
603 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
604 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
605 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
606 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
607 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
608 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
609 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
609 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
610 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
611 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
612 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
613 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
614 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
610 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
611 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
612 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
613 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
614 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
615 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
616 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
617 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
617 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
618 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
618 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
619 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
620 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
620 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
621 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
622 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
622 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
623 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
624 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
625 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
626 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
627 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
623 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
624 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
625 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
626 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
627 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
628 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
629 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
629 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
630 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
631 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
630 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
631 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
632 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
633 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
634 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
635 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
636 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
637 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
637 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
638 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
639 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
640 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
641 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -645,20 +646,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
646 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
647 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
648 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
648 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
649 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
649 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
650 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
651 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
651 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
652 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
652 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
653 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
654 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
655 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
655 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
656 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
657 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
658 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
659 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
660 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
660 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
661 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
661 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
662 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
663 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
664 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
665 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -667,20 +668,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
668 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
669 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
670 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
670 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
671 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
672 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
673 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
674 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
675 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
675 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
676 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
677 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
678 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
679 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
680 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
676 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
677 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
678 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
679 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
680 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
681 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
682 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
682 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
683 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
683 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
684 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
685 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
686 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
687 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -704,17 +705,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
705 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
706 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
707 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
707 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
708 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
709 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
710 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
708 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
709 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
710 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
711 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
712 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
713 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
714 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
715 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
716 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
716 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
717 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
717 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
718 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
719 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
720 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
721 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -730,48 +731,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
731 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
732 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
733 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
733 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
734 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
735 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
736 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
737 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
738 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
739 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
740 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
740 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
741 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
742 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
743 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
744 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
744 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
745 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
746 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
746 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
747 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
748 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
749 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
749 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
750 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
751 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
752 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
753 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
754 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
754 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
755 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
756 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
757 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
755 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
756 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
757 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
758 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
759 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
760 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
761 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
762 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
763 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
763 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
764 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
765 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
765 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
766 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
767 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
766 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
767 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
768 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
769 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
770 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
771 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
771 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
772 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
773 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
773 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
774 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
774 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
775 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
776 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
777 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
778 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -779,119 +780,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
780 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
781 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
782 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
782 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
783 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
784 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
785 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
786 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
787 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
788 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
789 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
790 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
791 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
792 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
793 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
794 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
795 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
796 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
797 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
798 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
799 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
800 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
801 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
802 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
803 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
804 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
805 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
806 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
807 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
808 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
809 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
810 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
811 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
812 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
813 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
814 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
815 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
816 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
817 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
818 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
819 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
820 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
821 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
822 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
823 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
824 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
825 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
826 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
827 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
828 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
829 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
830 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
831 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
832 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
833 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
834 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
835 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
836 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
837 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
838 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
839 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
840 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
841 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
842 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
843 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
844 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
845 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
846 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
847 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
848 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
849 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
850 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
851 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
852 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
853 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
854 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
855 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
856 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
857 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
858 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
859 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
860 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
861 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
862 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
863 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
864 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
865 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
866 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
867 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
868 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
869 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
870 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
871 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
872 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
873 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
874 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
875 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
876 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
783 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
784 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
785 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
786 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
787 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
788 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
789 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
790 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
791 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
792 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
793 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
794 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
795 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
796 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
797 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
798 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
799 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
800 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
801 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
802 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
803 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
804 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
805 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
806 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
807 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
808 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
809 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
810 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
811 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
812 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
813 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
814 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
815 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
816 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
817 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
818 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
819 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
820 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
821 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
822 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
823 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
824 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
825 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
826 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
827 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
828 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
829 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
830 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
831 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
832 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
833 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
834 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
835 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
836 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
837 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
838 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
839 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
840 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
841 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
842 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
843 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
844 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
845 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
846 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
847 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
848 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
849 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
850 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
851 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
852 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
853 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
854 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
855 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
856 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
857 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
858 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
859 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
860 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
861 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
862 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
863 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
864 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
865 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
866 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
867 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
868 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
869 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
870 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
871 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
872 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
873 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
874 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
875 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
876 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
877 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
878 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
879 +l.Init();return l},ZLIB=ZLIB||{};
880 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
881 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
879 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
880 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
881 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
882 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
883 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
884 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
885 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
883 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
884 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
886 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
887 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
888 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
889 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
887 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
888 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
889 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
890 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
890 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
891 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
892 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
893 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
894 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
895 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
893 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
894 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
896 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
897 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
898 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
899 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
900 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -913,22 +916,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
916 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
917 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
918 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
916 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
917 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
918 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
919 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
920 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
919 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
920 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
921 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
922 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
923 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
924 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
925 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
926 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
927 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
928 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
926 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
927 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
929 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
930 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
931 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
929 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
930 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
931 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
932 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
933 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
934 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
935 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
936 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
937 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -944,16 +947,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
947 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
948 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
949 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
947 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
948 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
949 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
950 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
951 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
952 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
953 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
950 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
951 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
952 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
953 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
954 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
955 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
956 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
957 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
955 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
956 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Loading ...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
958 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
959 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Loading ...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
960 StatusStrs=["Disconnected","\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 ...","\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c...","\u0421\u0432\u044f\u0437\u0430\u043d\u044b"],t,t2,rsepass=null;
961 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
962 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR + LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -990,18 +993,18 @@ n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementServic
993 null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u041d\u0438\u043a\u0442\u043e</i>":EscapeHtml(c);d+=TableEntry("\u0418\u043c\u044f \u0438 \u0434\u043e\u043c\u0435\u043d",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b",
994 guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430 (ACM)",
995 4==l.ProvisioningMode&&(n=" \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c (CCM)",b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&
993 -(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;
994 -5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+="\u041f\u043e\u0440\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f");q&&(e+=", \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c");
995 -n&&(e+=", IDE-Redirect");h&&(e+=", \u041a\u0432\u043c");""==e&&(e=" \u041d\u0438\u043a\u0442\u043e");d+=TableEntry("\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439",
996 +(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;
997 +5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);q&&(e+="\u041f\u043e\u0440\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f");p&&(e+=", \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0435\u0442\u044c");
998 +n&&(e+=", IDE-Redirect");g&&(e+=", \u041a\u0432\u043c");""==e&&(e=" \u041d\u0438\u043a\u0442\u043e");d+=TableEntry("\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439",
999 7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439","\u0412\u0442\u043e\u0440\u0438\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439","3-\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439"][n.DefaultScreen]),e='<span title="'+format("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: {0}",
1000 e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\u041f\u043e\u0440\u0442 5900 \u0432\u043a\u043b\u044e\u0447\u0435\u043d"),1==n.OptInPolicy&&(e+=","+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438":"\u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0431\u043e\u0440")),e+=","+n.SessionTimeout+" \u043c\u0438\u043d\u0443\u0442"+(0<n.SessionTimeout?"s":"")+" \u0442\u0430\u0439\u043c-\u0430\u0443\u0442 \u0441\u0435\u0430\u043d\u0441\u0430",
1001 9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+="\u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0433\u0430\u0448\u0435\u043d\u0438\u0435"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b",addLinkConditional(e,"showDesktopSettingsDlg()",
999 -xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),
1000 -1==p&&(e="\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f KVM"),4294967295==p&&(e="\u0412\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
1002 +xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",q=amtsysstate.IPS_OptInService.response.OptInRequired,0==q&&(e="\u041d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),
1003 +1==q&&(e="\u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f KVM"),4294967295==q&&(e="\u0412\u0441\u0435\u0433\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f",
1004 e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439",1:"\u0414\u0440\u0443\u0433\u043e\u0439",2:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e",3:"\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",4:"\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435",5:"\u041d\u0435\u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b\u0439",6:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u043d\u043e \u0432 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435",
1005 7:"\u0412 \u0442\u0435\u0441\u0442\u0435",8:"\u041e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439",9:"\u0417\u0430\u043c\u043e\u0440\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435",10:"\u043d\u0430\u0447\u0430\u043b\u043e",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:
1003 -"\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,
1004 -q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),
1006 +"\u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,
1007 +p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f",addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),
1008 "syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ...","showPowerActionDlg()")+" ";e+=AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");
1009 QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0435\u0442\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439.");
1010 d=d+"<br><h2>\u043e\u0431\u0449\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438</h2>"+TableStart();e="";"<i>\u041d\u0438\u043a\u0442\u043e</i>"!=c&&(1==v.SharedFQDN&&(e=", \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u0441 \u041e\u0421"),0==v.SharedFQDN&&(e="\u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u041e\u0421"));d+=TableEntry("\u0418\u043c\u044f \u0438 \u0434\u043e\u043c\u0435\u043d",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));
@@ -1015,8 +1018,8 @@ a&&xxWireless&&xxWireless.CIM_WiFiPortCapabilities.response&&(d+=TableEntry("\u0
1018 "showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\u041e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043f\u0438\u043d\u0433",addLinkConditional(["\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e","ICMP-\u043e\u0442\u0432\u0435\u0442","\u041e\u0442\u0432\u0435\u0442 RMCP","ICMP \u0438 RMCP \u043e\u0442\u0432\u0435\u0442"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",
1019 xxAccountAdminName)),e=1==c.DHCPEnabled?"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DHCP-\u0441\u0435\u0440\u0432\u0435\u0440\u0430":"\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 IPv4",addLinkConditional(e,
1020 "showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("\u0410\u0434\u0440\u0435\u0441 IPv4",isIpAddress(c.IPAddress,"\u041d\u0438\u043a\u0442\u043e"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("\u0428\u043b\u044e\u0437 / \u043c\u0430\u0441\u043a\u0430 IPv4",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u041d\u0438\u043a\u0442\u043e")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d IPv4",
1018 -e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?
1019 -"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438 \u0440\u0443\u0447\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430":"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430");d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 IPv6",addLinkConditional(p,
1021 +e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="\u041e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u043e",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?
1022 +"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438 \u0440\u0443\u0447\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430":"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430");d+=TableEntry("\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 IPv6",addLinkConditional(q,
1023 "showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=","),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("\u0410\u0434\u0440\u0435\u0441 IPv6",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("\u0410\u0434\u0440\u0435\u0441 IPv6","\u041d\u0438\u043a\u0442\u043e");
1024 isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e IPv6",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("\u0421\u0435\u0440\u0432\u0435\u0440 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d IPv6",e))}}d+=TableEnd()}}1!=
1025 urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
@@ -1076,8 +1079,8 @@ TableStart(),c+=TableEntry("\u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u04
1079 2==a[0].OverwritePolicy?"\u0417\u0430\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u043d\u044b\u0439":"\u041d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1080 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\u0424\u0438\u043b\u044c\u0442\u0440" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c...","SaveAuditLog()")+AddButton("\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b",
1081 "ClearAuditLog()"))+"<br>");if(0==c.length)d="\u0421\u043e\u0431\u044b\u0442\u0438\u044f \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0430\u0443\u0434\u0438\u0442\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u0412\u0440\u0435\u043c\u044f</b><td class=r1 style=width:260px><b>\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440</b><td class=r1><b>Action</b>";
1079 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=p&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1080 -minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 Intel AMT",auditLog)}
1082 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=","+v.Event);null!=v.ExStr&&(n+=","+v.ExStr);""!=l&&""!=q&&(l+=",");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",
1083 +minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\u0416\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430 Intel AMT",auditLog)}
1084 function ClearAuditLog(b){QH(60,"\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0436\u0443\u0440\u043d\u0430\u043b \u0430\u0443\u0434\u0438\u0442\u0430?");setDialogMode(1,"\u0410\u0443\u0434\u0438\u0442 \u0416\u0443\u0440\u043d\u0430\u043b",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}
1085 function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\u0410\u0443\u0434\u0438\u0442 \u0416\u0443\u0440\u043d\u0430\u043b","\u041e\u0448\u0438\u0431\u043a\u0430: "+d)}
1086 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u0412\u0440\u0435\u043c\u044f",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u0438\u043d\u0438\u0446\u0438\u0430\u0442\u043e\u0440",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u0410\u0434\u0440\u0435\u0441",a.NetAddress));d+=addHtmlValue("\u0437\u0430\u044f\u0432\u043a\u0430",a.AuditApp);d+=addHtmlValue("\u0421\u043e\u0431\u044b\u0442\u0438\u0435",a.Event);if(null!=
@@ -1148,7 +1151,7 @@ function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableE
1151 xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u0433\u0435\u043d\u0442\u0430 Intel&reg; AMT.<br><br>";if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||
1152 0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\u0410\u0433\u0435\u043d\u0442 \u043f\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044e \u0437\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));
1153 a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 ..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f ..." onclick=deleteWatchdogActions(event,'+
1151 -c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=": \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+
1154 +c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" : \u0421\u043e\u0431\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u0432\u0445\u043e\u0434\u0430")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+
1155 AddButton("\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u0440\u043e\u0436\u0435\u0432\u043e\u0439 \u0442\u0430\u0439\u043c\u0435\u0440 ...","AddWatchdog()"));b+="<br>";QH(54,b)}}function getWatchdogTransitionStr(b){if(31==b)return"\u041b\u044e\u0431\u043e\u0439 \u0448\u0442\u0430\u0442";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1156 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u0443\u0431\u044a\u0435\u043a\u0442",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",
1157 amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435",watchdogEnabledStates[b.EnabledState]);c+=addHtmlValue("\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a\u0430",b.StartupInterval+" \u0441\u0435\u043a\u0443\u043d\u0434 (\u044b)");c+=addHtmlValue("\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0442\u0430\u0439\u043c-\u0430\u0443\u0442\u0430",
@@ -1269,7 +1272,7 @@ function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT
1272 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442",-1==c?3:7,
1273 function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\u041d\u043e\u0432\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1274 function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u041e\u0448\u0438\u0431\u043a\u0430 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430","\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+
1272 -":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}
1275 +":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}
1276 function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1277 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,
1278 c)}}function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\u0422\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442\u043d\u044b\u0439","\u0422\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0442\u044c","\u0412\u0441\u0435 (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0438 \u043f\u043e \u0441\u0435\u0442\u0438)"];
@@ -1289,8 +1292,8 @@ function terminal_onSetupBinRead(b){d3pastetextarea.value=b.target.result;setDia
1292 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1293 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1294 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1292 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1293 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1295 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1296 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1297 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1298 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1299 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1301,16 +1304,16 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1304 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1305 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1306 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Connect":"\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","The remote device is busy, a session may already be open."):
1304 -3==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):
1305 -50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1306 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", \u0421\u043e\u0444\u0442-\u041a\u0412\u041c":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}
1307 +3==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):
1308 +50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",
1309 +ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", \u0421\u043e\u0444\u0442-\u041a\u0412\u041c":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}
1310 function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430",3,showDesktopSettingsChanged))}
1311 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1312 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1310 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1311 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1312 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1313 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1313 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1314 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1315 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1316 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1317 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1318 "8px"),center()))}
1319 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0432\u043e\u0434 \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b",3,showDeskTypeEx,'<div>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442 \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 OK, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0421\u0428\u0410. \u041f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u0443\u0440\u0441\u043e\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1321,13 +1324,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1324 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1325 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1326 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1324 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1327 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1328 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1329 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1330 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1328 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u043a\u043e\u0440\u0435\u043d\u044c</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+
1329 -EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1330 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1331 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u043a\u043e\u0440\u0435\u043d\u044c</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+
1332 +EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1333 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1334 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1335 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1336 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1483,10 +1486,9 @@ function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSe
1486 setDialogMode(1,"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Intel&reg; Remote Secure Erase?<br>\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u0440\u0430\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u043f\u0430\u0440\u043e\u043b\u044c</div></div><br><div style=color:red><b> \u041f\u0420\u0415\u0414\u0423\u041f\u0420\u0415\u0416\u0414\u0415\u041d\u0418\u0415. </ b> \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.</div>",
1487 rsepass=1,setDialogMode(11,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1488 function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b> \u041f\u0420\u0415\u0414\u0423\u041f\u0420\u0415\u0416\u0414\u0415\u041d\u0418\u0415. </ b> \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.</div>";var a=
1486 -[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1487 -d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+
1488 -"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1489 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1489 +[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");
1490 +d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\u0421\u0438\u043b\u043e\u0432\u044b\u0435 \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f",
1491 +3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1492 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ..."),
1493 amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1494 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441\u0438\u043b\u044b","\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f ...");null!=
@@ -1528,11 +1530,11 @@ function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\u0421\u0438\u043b\u043e\
1530 function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1531 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1532 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1531 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1533 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1534 b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c Intel&reg; AMT \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430.<br><br>";
1533 -var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\u043a\u043e\u0440\u0435\u043d\u044c";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\u0421\u043a\u0430\u0447\u0430\u0442\u044c","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+
1534 -EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" \u0431\u0430\u0439\u0442\u043e\u0432</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+=
1535 -"<div style=padding-left:15px><br><i>\u0424\u0430\u0439\u043b\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ...<br/>"+
1535 +var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+" / "+q):e+"\u043a\u043e\u0440\u0435\u043d\u044c";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\u0421\u043a\u0430\u0447\u0430\u0442\u044c","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+
1536 +EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" \u0431\u0430\u0439\u0442\u043e\u0432</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+=
1537 +"<div style=padding-left:15px><br><i>\u0424\u0430\u0439\u043b\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 ...<br/>"+
1538 AddButton("\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435","PullStorage()"))}
1539 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\u043f\u0440\u043e\u0434\u0430\u0432\u0435\u0446",b));""!=c&&(e+=addHtmlValue("\u0437\u0430\u044f\u0432\u043a\u0430",c));e+=addHtmlValue("\u0438\u043c\u044f",a);e+=addHtmlValue("\u0420\u0430\u0437\u043c\u0435\u0440",v.size+" bytes");v.link&&(e+=addHtmlValue("\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442",v.link));setDialogMode(11,"\u042d\u043b\u0435\u043c\u0435\u043d\u0442 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f",
1540 5,showStorageDetailsEx,e,d)}}function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}
@@ -1551,7 +1553,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1553 b}
1554 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1555 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1554 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u0434\u043d\u0435\u0439").replace("H"," \u0447\u0430\u0441\u043e\u0432").replace("M"," \u043c\u0438\u043d\u0443\u0442");b=b.replace(" 1 \u0434\u043d\u0435\u0439"," 1 \u0434\u0435\u043d\u044c").replace(" 1 \u0447\u0430\u0441"," 1 \u0447\u0430\u0441").replace(" 1 \u043c\u0438\u043d\u0443\u0442\u0430"," 1 \u043c\u0438\u043d\u0443\u0442\u0430");return b.substring(0,b.length-1)}
1556 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u0434\u043d\u0435\u0439").replace("H"," \u0447\u0430\u0441\u043e\u0432").replace("M"," \u043c\u0438\u043d\u0443\u0442");b=b.replace(" 1 \u0434\u043d\u0435\u0439"," 1 \u0434\u0435\u043d\u044c").replace(" 1 \u0447\u0430\u0441"," 1 \u0447\u0430\u0441").replace(" 1 \u043c\u0438\u043d\u0443\u0442\u0430 "," 1 \u043c\u0438\u043d\u0443\u0442\u0430 ");return b.substring(0,b.length-1)}
1557 function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1558 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c.<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u043f\u0440\u043e\u0441\u043d\u0443\u0442\u044c\u0441\u044f "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", ",
1559 " \u0432"),void 0!=d[c].Interval&&(a+=" \u0438 \u043a\u0430\u0436\u0434\u044b\u0439"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&(a+="\u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c...",'showAddAlarm(" + i + ")')),
public/commander-zh-chs.htm
+618 -614
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="zh-chs" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=连接 onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>断线</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>系统状况</a><p id=go14 class=nav1 onclick=go(14)><a>远程桌面</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>档案</a><p id=go13 class=nav1 onclick=go(13)><a>局域网串行</a><p id=go2 class=nav1 onclick=go(2)><a>硬件资讯</a><p id=go6 class=nav1 onclick=go(6)><a>事件簿</a><p id=go15 class=nav1 onclick=go(15)><a>审核日志</a><p id=go21 class=nav1 onclick=go(21)><a>存储</a><p id=go8 class=nav1 onclick=go(8)><a>网络设置</a><p id=go17 class=nav1 onclick=go(17)><a>网际网路设定</a><p id=go16 class=nav1 onclick=go(16)><a>安全设定</a><p id=go19 class=nav1 onclick=go(19)><a>代理人在场</a><p id=go18 class=nav1 onclick=go(18)><a>系统防御</a><p id=go11 class=nav1 onclick=go(11)><a>用户帐号</a><p id=go22 class=nav1 onclick=go(22)><a>订阅内容</a><p id=go23 class=nav1 onclick=go(23)><a>唤醒警报</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN浏览器</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=磁盘映射 onclick=iderToggleDiskMap()><input type=button value=停止IDE-R会话 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>软盘块为512字节。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM,块为2048字节。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>此计算机的固件应更新,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>请在这里检查</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>载入中...</h1></div><div id=p1 style=display:none><h1>系统状况</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>硬件资讯</h1><span id=16></span></div><div id=p6 style=display:none><h1>事件簿</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>网络设置</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>用户帐号</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN浏览器</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=询问 style=margin:4px onclick=wsmanQuery()><input type=button value=明确 style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=过滤 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>局域网串行终端</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或LAN上串行功能已禁用<span id=26>,请点击此处启用它。</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=开始捕捉 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=连接 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>断开连接。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR +低频" title="切换返​​回键将发送的内容" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="切换终端尺寸" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="英特尔(F10 = ESC + [OM)" title="切换F1至F10键仿真类型" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=扩展的ASCII title="切换终端仿真类型" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>退出<option value=8>退格键<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=糊 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>远程桌面</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或KVM功能已禁用<span id=37>,请点击此处启用它。</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="向左旋转" onclick=drotate(-1)>↺</div><div class=rb title="右旋" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="切换全屏模式" onkeypress="return false" onkeydown="return false" value=充分 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="保存远程桌面的屏幕截图" onkeypress="return false" onkeydown="return false" value=救... onclick=deskSaveImage() style=margin-right:3px><input type=button value=设定... title="编辑远程桌面设置" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="更改远程机器的电源状态" onkeypress="return false" onkeydown="return false" value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=连接 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>断开连接。</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>赢得<option value=1>胜负<option value=2>赢+<option value=3>赢+ L<option value=4>Win + M<option value=20>Win + R<option value=23>赢+左<option value=24>赢+右<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=类型 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>黑屏&nbsp;</span><span id=47><input id=48 type=checkbox>只读&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>审核日志</h1><span id=50></span></div><div id=p16 style=display:none><h1>安全设定</h1><span id=51></span></div><div id=p17 style=display:none><h1>网际网路设定</h1><span id=52></span></div><div id=p18 style=display:none><h1>系统防御</h1><span id=53></span></div><div id=p19 style=display:none><h1>代理人在场</h1><span id=54></span></div><div id=p21 style=display:none><h1>存储</h1><span id=55></span></div><div id=p22 style=display:none><h1>活动订阅</h1><span id=56></span></div><div id=p23 style=display:none><h1>唤醒警报</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>档案</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=上>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=全选 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=改名 onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=删除 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新建文件夹 onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=上载 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=复制 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=糊 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=刷新 onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">按名称分类<option value=2>按大小排序<option value=3>按日期排序<option value=4>按名称降序<option value=5>按大小下降<option value=6>按日期降序</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>用户名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>密码*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>确认密码</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>本地<option value=1>网络<option value=2>任何</select><div>允许</div></div><div>授予的权限</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*至少8个字符,大写,小写,0-9和!@#$%^&*()+-之一</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>权力行动</div></div><div><span style=color:red>警告:</span>某些电源操作可能会导致数据丢失,并可能断开桌面,终端或磁盘重定向会话。</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意码</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>主要展示<option value=1>辅助显示<option id=d6ThirdDisplay value=2 style=display:none>第三显示</select><div>同意显示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>图像编码</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>显示本地鼠标光标</label><br><label><input type=checkbox id=d7showcad>显示Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>极限帧率</label><br><label><input type=checkbox id=d7noMouseRotate>不要旋转鼠标</label><br></div><div>其他设定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">软件KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>质量</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>缩放比例</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理员 style=float:right;width:220px><div style=height:20px>用户名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>密码</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>重定向端口</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM远程桌面</label><label style=display:block><input type=checkbox id=c17>IDE重定向<br></label><label style=display:block><input type=checkbox id=c18>局域网串行<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不需要<br></label><label><input type=radio name=d10 id=c20 value=1>仅KVM需要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>始终需要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">个人资料名称</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>优先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>认证方式</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>认证协议<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>没有</select><div>加密</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">密码*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">确认密码</div></div></div><div id=dialog19 style=margin:auto;margin:3px>这会将此计算机的英特尔®AMT的整个状态保存到文件中。密码将不会保存,但可能会包含一些敏感数据。<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>残障人士<br><input type=radio name=d20 id=d20b value=1>ICMP回应<br><input type=radio name=d20 id=d20c value=2>RMCP响应<br><input type=radio name=d20 id=d20d value=3>ICMP和RMCP响应<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>操作系统IP地址同步</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP地址</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>子网标记</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>网关</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>主DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>备用DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>残障人士<option value=1>禁用,DHCP更新<option value=2>已启用</select><div>动态DNS客户端</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>更新间隔(分钟)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>默认间隔时间是1440分钟,默认TTL是900秒。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>充电<option value=10>重启<option value=5>电源周期<option value=8>掉电<option id=d24p500 value=500>操作系统从待机状态唤醒<option id=d24p501 value=501>操作系统省电<option value=999>设置启动选项</select><div>远程命令</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS暂停</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>强制执行安全启动</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS设置</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>强制进度事件</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>锁定电源按钮</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>锁定重置按钮</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>锁定睡眠按钮</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>锁键盘</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS密码绕过</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>重新刷新BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>安全模式</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>使用IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>局域网串行</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>英特尔®远程安全擦除</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>开机设定</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>没有<option id=ForceDVDBootOption value=1>强制启动CD / DVD<option id=ForcePXEBootOption value=2>强制PXE引导<option id=ForceHDBootOption value=3>强制硬盘启动<option id=ForceDiagBootOption value=4>强制诊断启动</select><div>引导源</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>没有<option value=1>索引1<option value=2>索引2<option value=3>索引3<option value=3>索引4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>引导到软盘<option value=1>引导至CDROM</select><div>IDER引导设备</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>系统默认<option id=c46 value=1>安静<option id=c47 value=2>详细<option id=c48 value=3>黑屏</select><div>详细性</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE密码</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>报警名称</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>唤醒日期(年月日)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>唤醒时间(小时:分钟:秒)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>间隔(天-小时-分钟)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>保持警惕<option value=1>完成时删除</select></div><div style=padding-top:4px>醒后</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>已启用<br></label><label><input type=radio name=d26b id=c50 value=0>残障人士<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>已启用<br></label><label><input type=radio name=d26a id=c52 value=0>残障人士<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=取消 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=好 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=删除 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="zh-chs" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()" oncontextmenu=handleContextMenu(event)><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=连接 onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>断线</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>系统状况</a><p id=go14 class=nav1 onclick=go(14)><a>远程桌面</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>档案</a><p id=go13 class=nav1 onclick=go(13)><a>局域网串行</a><p id=go2 class=nav1 onclick=go(2)><a>硬件资讯</a><p id=go6 class=nav1 onclick=go(6)><a>事件簿</a><p id=go15 class=nav1 onclick=go(15)><a>审核日志</a><p id=go21 class=nav1 onclick=go(21)><a>存储</a><p id=go8 class=nav1 onclick=go(8)><a>网络设置</a><p id=go17 class=nav1 onclick=go(17)><a>网际网路设定</a><p id=go16 class=nav1 onclick=go(16)><a>安全设定</a><p id=go19 class=nav1 onclick=go(19)><a>代理人在场</a><p id=go18 class=nav1 onclick=go(18)><a>系统防御</a><p id=go11 class=nav1 onclick=go(11)><a>用户帐号</a><p id=go22 class=nav1 onclick=go(22)><a>订阅内容</a><p id=go23 class=nav1 onclick=go(23)><a>唤醒警报</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN浏览器</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value=磁盘映射 onclick=iderToggleDiskMap()><input type=button value=停止IDE-R会话 onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>软盘块为512字节。</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM,块为2048字节。</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">✖</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>此计算机的固件应更新,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&amp;languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>请在这里检查</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>载入中...</h1></div><div id=p1 style=display:none><h1>系统状况</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>硬件资讯</h1><span id=16></span></div><div id=p6 style=display:none><h1>事件簿</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>网络设置</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>用户帐号</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN浏览器</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tbody><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=询问 style=margin:4px onclick=wsmanQuery()><input type=button value=明确 style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=过滤 style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>局域网串行终端</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或LAN上串行功能已禁用<span id=26>,请点击此处启用它。</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=开始捕捉 title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=连接 onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>断开连接。</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="CR +低频" title="切换返​​回键将发送的内容" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="切换终端尺寸" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="英特尔(F10 = ESC + [OM)" title="切换F1至F10键仿真类型" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=扩展的ASCII title="切换终端仿真类型" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>退出<option value=8>退格键<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=糊 disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>远程桌面</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>英特尔®AMT重定向端口或KVM功能已禁用<span id=37>,请点击此处启用它。</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>远程计算机未打开电源,请单击此处以发出电源命令。</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tbody><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="向左旋转" onclick=drotate(-1)>↺</div><div class=rb title="右旋" onclick=drotate(1)>↻</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="切换全屏模式" onkeypress="return false" onkeydown="return false" value=充分 onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="保存远程桌面的屏幕截图" onkeypress="return false" onkeydown="return false" value=救... onclick=deskSaveImage() style=margin-right:3px><input type=button value=设定... title="编辑远程桌面设置" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=依德 title="开始远程磁盘安装操作" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="更改远程机器的电源状态" onkeypress="return false" onkeydown="return false" value=电源动作... onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;✖</div>&nbsp;<input type=button id=c10 value=连接 onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>断开连接。</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>赢得<option value=1>胜负<option value=2>赢+<option value=3>赢+ L<option value=4>Win + M<option value=20>Win + R<option value=23>赢+左<option value=24>赢+右<option value=5>Shift + Win + M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=发送 onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=类型 onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>黑屏&nbsp;</span><span id=47><input id=48 type=checkbox>只读&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>审核日志</h1><span id=50></span></div><div id=p16 style=display:none><h1>安全设定</h1><span id=51></span></div><div id=p17 style=display:none><h1>网际网路设定</h1><span id=52></span></div><div id=p18 style=display:none><h1>系统防御</h1><span id=53></span></div><div id=p19 style=display:none><h1>代理人在场</h1><span id=54></span></div><div id=p21 style=display:none><h1>存储</h1><span id=55></span></div><div id=p22 style=display:none><h1>活动订阅</h1><span id=56></span></div><div id=p23 style=display:none><h1>唤醒警报</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>档案</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tbody><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=上>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value=全选 onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=改名 onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=删除 onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value=新建文件夹 onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=上载 onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=切 onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=复制 onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=糊 onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=刷新 onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">按名称分类<option value=2>按大小排序<option value=3>按日期排序<option value=4>按名称降序<option value=5>按大小下降<option value=6>按日期降序</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✓</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>✗</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tbody><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>✖</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>用户名</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>密码*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>确认密码</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>本地<option value=1>网络<option value=2>任何</select><div>允许</div></div><div>授予的权限</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*至少8个字符,大写,小写,0-9和!@#$%^&*()+-之一</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>权力行动</div></div><div><span style=color:red>警告:</span>某些电源操作可能会导致数据丢失,并可能断开桌面,终端或磁盘重定向会话。</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>同意码</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>主要展示<option value=1>辅助显示<option id=d6ThirdDisplay value=2 style=display:none>第三显示</select><div>同意显示</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>图像编码</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>残障人士<option value=2>Automatic<option value=3>已启用</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>显示本地鼠标光标</label><br><label><input type=checkbox id=d7showcad>显示Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>极限帧率</label><br><label><input type=checkbox id=d7noMouseRotate>不要旋转鼠标</label><br></div><div>其他设定</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">软件KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>质量</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>缩放比例</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=管理员 style=float:right;width:220px><div style=height:20px>用户名</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>密码</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>重定向端口</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM远程桌面</label><label style=display:block><input type=checkbox id=c17>IDE重定向<br></label><label style=display:block><input type=checkbox id=c18>局域网串行<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>不需要<br></label><label><input type=radio name=d10 id=c20 value=1>仅KVM需要<br></label><label><input type=radio name=d10 id=c21 value=4294967295>始终需要<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">个人资料名称</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="最多32个字符"><div title="最多32个字符">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>优先</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>认证方式</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>认证协议<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>没有</select><div>加密</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">密码*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="长度介于8到63个字符之间"><div title="长度介于8到63个字符之间">确认密码</div></div></div><div id=dialog19 style=margin:auto;margin:3px>这会将此计算机的英特尔®AMT的整个状态保存到文件中。密码将不会保存,但可能会包含一些敏感数据。<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>残障人士<br><input type=radio name=d20 id=d20b value=1>ICMP回应<br><input type=radio name=d20 id=d20c value=2>RMCP响应<br><input type=radio name=d20 id=d20d value=3>ICMP和RMCP响应<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>操作系统IP地址同步</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP地址</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>子网标记</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>网关</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>主DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>备用DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>残障人士<option value=1>禁用,DHCP更新<option value=2>已启用</select><div>动态DNS客户端</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>更新间隔(分钟)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL(秒)</div></div><div style=font-size:10px><br>默认间隔时间是1440分钟,默认TTL是900秒。</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>充电<option value=10>重启<option value=5>电源周期<option value=8>掉电<option id=d24p500 value=500>操作系统从待机状态唤醒<option id=d24p501 value=501>操作系统省电<option value=999>设置启动选项</select><div>远程命令</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS暂停</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>强制执行安全启动</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS设置</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>强制进度事件</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>锁定电源按钮</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>锁定重置按钮</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>锁定睡眠按钮</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>锁键盘</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS密码绕过</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>重新刷新BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>安全模式</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>使用IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>局域网串行</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>英特尔®远程安全擦除</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel® ME Settings</label><br></div></div><div>开机设定</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>没有<option id=ForceDVDBootOption value=1>强制启动CD / DVD<option id=ForcePXEBootOption value=2>强制PXE引导<option id=ForceHDBootOption value=3>强制硬盘启动<option id=ForceDiagBootOption value=4>强制诊断启动</select><div>引导源</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>没有<option value=1>索引1<option value=2>索引2<option value=3>索引3<option value=3>索引4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>引导到软盘<option value=1>引导至CDROM</select><div>IDER引导设备</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>系统默认<option id=c46 value=1>安静<option id=c47 value=2>详细<option id=c48 value=3>黑屏</select><div>详细性</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE密码</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>报警名称</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>唤醒日期(年月日)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>唤醒时间(小时:分钟:秒)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>间隔(天-小时-分钟)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>保持警惕<option value=1>完成时删除</select></div><div style=padding-top:4px>醒后</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>已启用<br></label><label><input type=radio name=d26b id=c50 value=0>残障人士<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>已启用<br></label><label><input type=radio name=d26a id=c52 value=0>残障人士<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=取消 style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=好 style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=删除 style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,173 +12,174 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Invalid Data";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Invalid Data";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"Agent watchdog "+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... changed to "+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case intrusion";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"A remote Serial Over LAN session was established.";if(1==c[2])return"Remote Serial Over LAN session finished. User control was restored.";if(2==c[2])return"A remote IDE-Redirection session was established.";if(3==c[2])return"Remote IDE-Redirection session finished. User control was restored."}if(36==
93 +a&&170==c[0])return"Agent watchdog "+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... changed to "+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case intrusion";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"A remote Serial Over LAN session was established.";if(1==c[2])return"Remote Serial Over LAN session finished. User control was restored.";if(2==c[2])return"A remote IDE-Redirection session was established.";if(3==c[2])return"Remote IDE-Redirection session finished. User control was restored."}if(36==
94 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="wired"),4294967293==a?"All received packet filter was matched on "+b+" interface.":4294967292==a?"All outbound packet filter was matched on "+b+" interface.":4294967290==a?"Spoofed packet filter was matched on "+b+" interface.":"Filter "+a+" was matched on "+b+" interface.";if(192==a)return 0==c[2]?"Security policy invoked. Some or all network traffic (TX) was stopped.":2==c[2]?"Security policy invoked. Some or all network traffic (RX) was stopped.":
95 "Security policy invoked.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"User request for remote connection.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC error: attempt to get posture while NAC in Intel\ufffd AMT is disabled.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA Error: general error"}return 6==a?"Authentication failed "+(c[1]+(c[2]<<8))+" times. The system may be under attack.":30==a?"No bootable media":32==a?"Operating system lockup or power interrupt":35==a?
96 -64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,
97 -2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>KVM Default Port</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));
98 -C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=
99 -[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,
100 -x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,
101 -p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};
102 -h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==
103 -a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
104 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
106 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
107 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
108 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
109 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
110 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
111 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
112 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
113 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
114 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
115 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
116 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
117 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
118 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
119 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
120 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
121 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
122 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
123 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
124 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
125 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
126 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
127 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
128 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
129 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
130 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
131 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
132 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
133 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
134 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
135 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
136 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
137 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
138 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
139 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
140 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
141 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
142 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
143 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
144 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
145 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
146 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
147 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
148 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
149 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
150 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
96 +64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,
97 +2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM Default Port</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));
98 +h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=
99 +[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,
100 +y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,
101 +q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};
102 +g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==
103 +a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
104 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
106 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
107 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
108 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
109 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
110 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
111 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
112 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
113 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
114 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
115 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
116 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
117 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
118 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
119 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
120 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
121 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
122 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
123 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
124 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
125 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
126 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
127 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
128 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
129 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
130 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
131 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
132 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
133 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
134 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
135 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
136 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
137 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
138 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
139 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
140 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
141 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
142 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
143 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
144 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
145 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
146 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
147 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
148 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
149 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
150 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
151 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
152 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
153 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
154 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
155 -[a,b,[]])};var E="Unspecified.;No system memory is physically installed in the system.;No usable system memory, all installed memory has experienced an unrecoverable failure.;Unrecoverable hard-disk/ATAPI/IDE device failure.;Unrecoverable system-board failure.;Unrecoverable diskette subsystem failure.;Unrecoverable hard-disk controller failure.;Unrecoverable PS/2 or USB keyboard failure.;Removable boot media not found.;Unrecoverable video controller failure.;No video device detected.;Firmware (BIOS) ROM corruption detected.;CPU voltage mismatch (processors that share same supply have mismatched voltage requirements);CPU speed matching failure".split(";"),
156 -m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;User-initiated system setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
154 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
155 +[a,b,[]])};var D="Unspecified.;No system memory is physically installed in the system.;No usable system memory, all installed memory has experienced an unrecoverable failure.;Unrecoverable hard-disk/ATAPI/IDE device failure.;Unrecoverable system-board failure.;Unrecoverable diskette subsystem failure.;Unrecoverable hard-disk controller failure.;Unrecoverable PS/2 or USB keyboard failure.;Removable boot media not found.;Unrecoverable video controller failure.;No video device detected.;Firmware (BIOS) ROM corruption detected.;CPU voltage mismatch (processors that share same supply have mismatched voltage requirements);CPU speed matching failure".split(";"),
156 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
157 k="Unspecified;Other;Unknown;Processor;Disk;Peripheral;System management module;System board;Memory module;Processor module;Power supply;Add in card;Front panel board;Back panel board;Power system board;Drive backplane;System internal expansion board;Other system board;Processor board;Power unit;Power module;Power management board;Chassis back panel board;System chassis;Sub chassis;Other chassis board;Disk drive bay;Peripheral bay;Device bay;Fan cooling;Cooling unit;Cable interconnect;Memory device;System management software;BIOS;Intel(r) ME;System bus;Group;Intel(r) ME;External environment;Battery;Processing blade;Connectivity switch;Processor/memory module;I/O module;Processor I/O module;Management controller firmware;IPMI channel;PCI bus;PCI express bus;SCSI bus;SATA/SAS bus;Processor front side bus".split(";");
158 -h.RealmNames=";;Redirection;;Hardware Asset;Remote Control;Storage;Event Manager;Storage Admin;Agent Presence Local;Agent Presence Remote;Circuit Breaker;Network Time;General Information;Firmware Update;EIT;LocalUN;Endpoint Access Control;Endpoint Access Control Admin;Event Log Reader;Audit Log;ACL Realm;;;Local System".split(";");h.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
159 -u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",
158 +g.RealmNames=";;Redirection;;Hardware Asset;Remote Control;Storage;Event Manager;Storage Admin;Agent Presence Local;Agent Presence Remote;Circuit Breaker;Network Time;General Information;Firmware Update;EIT;LocalUN;Endpoint Access Control;Endpoint Access Control Admin;Event Log Reader;Audit Log;ACL Realm;;;Local System".split(";");g.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
159 +u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",
160 26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",
161 -1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",
162 -1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2E3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel&reg; ME Time Set",2200:"TCPIP Parameters Set",
163 -2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",
164 -2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3E3:"Opt-In Policy Change",3001:"Send Consent Code Event",
165 -3002:"Start Opt-In Blocked Event"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Invalid ME access","Invalid MEBx access"][b.charCodeAt(0)];if(1606==a){var c=["Disabled","Enabled"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=", "+b.substring(3));return c}return 1607==a?"Remote "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local "+["NoAuth",
166 -"ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+", "+["NoAuth","Auth","Disabled"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][b.charCodeAt(0)]:1900==a?"From "+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" to "+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"From "+["None",
167 -"KVM","All"][b.charCodeAt(0)]+" to "+["None","KVM","All"][b.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
161 +1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",
162 +1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2E3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",
163 +2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel&reg; ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",
164 +2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",
165 +2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3E3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
166 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Invalid ME access","Invalid MEBx access"][b.charCodeAt(0)];if(1606==a){var c=["Disabled","Enabled"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=", "+b.substring(3));return c}return 1607==a?"Remote "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:
167 +1617==a?g.RealmNames[ReadInt(b,0)]+", "+["NoAuth","Auth","Disabled"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][b.charCodeAt(0)]:1900==a?"From "+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" to "+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"From "+["None","KVM","All"][b.charCodeAt(0)]+" to "+
168 +["None","KVM","All"][b.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
169 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
170 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
171 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
172 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
173 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
173 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
174 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
175 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
176 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
177 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
178 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
179 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
180 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
181 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
174 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
175 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
176 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
177 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
178 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
179 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
180 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
181 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
182 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
183 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
184 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
185 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -189,10 +190,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
190 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
191 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
192 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
192 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
193 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
194 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
194 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
195 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
195 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
196 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
197 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
198 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
199 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -202,69 +203,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
203 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
204 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
205 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
205 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
206 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
207 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
208 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
209 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
210 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
211 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
212 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
206 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
207 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
208 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
209 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
210 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
211 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
212 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
213 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
214 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
214 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
215 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
216 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
217 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
218 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
219 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
220 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
221 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
222 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
223 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
224 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
225 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
226 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
227 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
215 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
216 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
217 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
218 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
219 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
220 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
221 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
222 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
223 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
224 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
225 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
226 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
227 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
228 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
229 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
230 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
231 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
232 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
232 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
233 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
234 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
233 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
234 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
235 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
236 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
237 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
238 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
239 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
240 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
240 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
241 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
242 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
243 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
244 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
245 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
246 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
247 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
241 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
242 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
243 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
244 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
245 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
246 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
247 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
248 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
249 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
250 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
251 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
251 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
252 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
253 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
254 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
255 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
256 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
257 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
258 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
259 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
260 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
261 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
262 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
263 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
252 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
253 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
254 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
255 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
256 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
257 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
258 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
259 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
260 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
261 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
262 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
263 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
264 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
265 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
265 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
266 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
267 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
266 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
267 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
268 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
269 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
270 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
271 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -278,213 +279,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
279 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
280 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
281 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
281 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
282 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
283 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
283 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
284 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
285 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
286 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
287 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
288 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
289 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
290 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
284 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
285 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
286 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
287 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
288 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
289 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
290 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
291 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
292 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
292 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
293 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
294 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
293 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
294 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
295 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
296 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
297 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
297 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
298 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
299 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
299 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
300 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
301 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
301 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
302 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
303 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
304 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
305 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
306 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
307 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
308 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
309 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
310 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
311 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
312 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
313 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
302 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
303 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
304 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
305 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
306 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
307 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
308 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
309 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
310 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
311 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
312 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
313 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
314 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
315 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
315 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
316 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
317 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
318 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
319 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
320 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
321 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
322 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
323 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
316 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
317 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
318 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
319 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
320 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
321 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
322 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
323 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
324 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
325 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
326 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
327 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
328 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
329 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
330 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
330 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
331 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
332 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
333 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
334 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
335 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
331 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
332 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
333 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
334 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
335 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
336 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
337 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
337 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
338 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
339 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
339 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
340 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
341 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
342 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
343 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
344 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
345 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
346 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
347 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
348 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
340 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
341 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
342 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
343 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
344 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
345 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
346 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
347 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
348 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
349 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
350 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
350 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
351 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
352 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
353 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
354 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
351 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
352 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
353 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
354 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
355 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
356 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
357 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
358 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
358 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
359 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
360 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
361 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
362 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
362 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
363 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
364 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
365 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
366 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
367 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
368 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
363 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
364 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
365 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
366 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
367 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
368 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
369 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
370 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
370 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
371 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
372 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
373 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
374 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
371 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
372 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
373 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
374 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
375 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
376 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
376 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
377 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
378 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
379 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
379 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
380 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
380 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
381 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
382 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
383 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
383 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
384 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
385 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
386 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
384 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
385 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
386 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
387 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
388 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
388 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
389 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
390 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
391 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
389 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
390 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
391 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
392 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
393 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
394 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
395 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
395 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
396 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
397 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
398 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
399 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
400 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
401 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
402 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
403 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
404 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
405 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
406 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
396 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
397 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
398 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
399 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
400 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
401 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
402 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
403 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
404 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
405 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
406 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
407 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
408 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
408 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
409 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
410 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
409 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
410 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
411 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
412 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
412 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
413 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
414 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
415 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
416 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
413 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
414 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
415 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
416 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
417 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
418 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
418 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
419 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
420 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
420 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
421 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
422 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
421 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
422 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
423 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
424 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
424 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
425 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
426 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
427 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
428 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
429 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
430 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
431 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
432 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
433 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
434 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
435 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
436 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
437 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
438 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
439 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
440 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
441 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
442 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
425 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
426 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
427 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
428 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
429 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
430 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
431 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
432 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
433 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
434 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
435 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
436 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
437 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
438 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
439 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
440 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
441 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
442 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
443 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
444 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
444 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
445 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
446 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
446 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
447 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
448 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
449 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
449 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
450 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
451 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
452 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
453 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
454 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
455 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
456 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
457 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
458 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
459 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
460 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
461 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
462 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
463 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
464 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
465 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
450 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
451 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
452 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
453 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
454 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
455 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
456 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
457 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
458 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
459 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
460 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
461 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
462 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
463 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
464 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
465 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
466 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
467 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
468 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
469 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
469 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
470 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
471 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
470 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
471 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
472 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
473 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
473 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
474 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
475 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
476 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
477 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
478 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
479 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
480 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
480 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
481 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
482 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
483 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
481 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
482 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
483 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
484 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
485 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
485 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
486 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
487 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
486 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
487 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
488 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
489 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
490 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
491 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -502,111 +503,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
503 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
504 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
505 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
505 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
506 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
507 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
508 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
506 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
507 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
508 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
509 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
510 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
510 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
511 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
512 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
513 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
514 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
511 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
512 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
513 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
514 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
515 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
516 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
516 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
517 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
518 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
519 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
520 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
520 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
521 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
521 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
522 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
523 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
524 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
525 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
525 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
526 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
527 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
528 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
529 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
530 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
531 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
532 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
532 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
533 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
534 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
534 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
535 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
536 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
537 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
538 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
539 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
540 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
541 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
535 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
536 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
537 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
538 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
539 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
540 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
541 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
542 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
543 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
544 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
544 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
545 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
546 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
546 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
547 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
548 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
548 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
549 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
550 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
551 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
552 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
553 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
554 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
555 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
549 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
550 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
551 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
552 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
553 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
554 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
555 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
556 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
557 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
558 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
558 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
559 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
560 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
561 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
562 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
559 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
560 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
561 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
562 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
563 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
564 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
564 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
565 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
566 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
567 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
568 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
569 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
570 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
571 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
572 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
573 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
574 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
575 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
576 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
577 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
578 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
579 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
565 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
566 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
567 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
568 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
569 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
570 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
571 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
572 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
573 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
574 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
575 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
576 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
577 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
578 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
579 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
580 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
581 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
581 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
582 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
583 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
584 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
585 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
586 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
582 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
583 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
584 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
585 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
586 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
587 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
588 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
589 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
589 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
590 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
590 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
591 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
592 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
592 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
593 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
594 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
594 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
595 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
596 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
597 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
598 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
599 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
595 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
596 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
597 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
598 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
599 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
600 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
601 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
601 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
602 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
603 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
602 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
603 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
604 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
605 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
606 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
607 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
608 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
609 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
609 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
610 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
611 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
612 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
613 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -617,20 +618,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
618 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
619 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
620 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
620 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
621 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
621 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
622 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
623 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
623 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
624 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
624 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
625 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
626 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
627 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
627 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
628 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
629 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
630 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
631 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
632 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
632 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
633 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
633 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
634 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
635 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
636 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
637 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -639,20 +640,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
640 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
641 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
642 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
642 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
643 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
644 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
645 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
646 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
647 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
647 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
648 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
649 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
650 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
651 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
652 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
648 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
649 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
650 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
651 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
652 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
653 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
654 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
654 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
655 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
655 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
656 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
657 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
658 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
659 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -676,17 +677,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
677 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
678 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
679 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
679 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
680 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
681 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
682 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
680 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
681 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
682 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
683 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
684 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
685 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
686 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
687 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
688 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
688 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
689 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
689 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
690 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
691 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
692 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
693 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -702,48 +703,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
703 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
704 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
705 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
705 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
706 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
707 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
708 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
709 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
710 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
711 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
712 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
712 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
713 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
714 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
715 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
716 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
716 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
717 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
718 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
718 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
719 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
720 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
721 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
721 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
722 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
723 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
724 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
725 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
726 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
726 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
727 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
728 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
729 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
727 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
728 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
729 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
730 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
731 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
732 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
733 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
734 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
735 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
735 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
736 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
737 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
737 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
738 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
739 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
738 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
739 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
740 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
741 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
742 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
743 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
743 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
744 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
745 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
745 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
746 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
746 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
747 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
748 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
749 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
750 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -751,119 +752,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
752 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
753 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
754 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
754 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
755 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
756 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
757 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
758 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
759 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
760 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
761 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
762 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
763 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
764 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
765 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
766 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
767 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
768 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
769 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
770 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
771 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
772 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
773 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
774 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
775 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
776 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
777 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
778 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
779 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
780 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
781 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
782 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
783 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
784 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
785 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
786 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
787 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
788 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
789 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
790 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
791 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
792 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
793 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
794 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
795 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
796 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
797 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
798 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
799 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
800 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
801 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
802 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
803 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
804 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
805 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
806 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
807 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
808 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
809 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
810 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
811 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
812 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
813 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
814 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
815 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
816 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
817 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
818 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
819 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
820 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
821 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
822 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
823 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
824 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
825 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
826 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
827 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
828 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
829 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
830 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
831 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
832 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
833 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
834 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
835 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
836 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
837 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
838 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
839 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
840 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
841 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
842 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
843 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
844 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
845 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
846 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
847 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
848 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
755 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
756 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
757 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
758 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
759 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
760 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
761 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
762 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
763 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
764 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
765 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
766 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
767 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
768 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
769 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
770 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
771 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
772 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
773 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
774 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
775 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
776 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
777 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
778 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
779 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
780 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
781 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
782 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
783 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
784 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
785 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
786 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
787 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
788 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
789 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
790 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
791 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
792 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
793 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
794 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
795 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
796 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
797 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
798 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
799 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
800 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
801 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
802 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
803 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
804 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
805 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
806 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
807 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
808 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
809 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
810 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
811 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
812 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
813 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
814 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
815 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
816 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
817 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
818 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
819 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
820 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
821 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
822 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
823 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
824 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
825 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
826 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
827 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
828 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
829 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
830 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
831 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
832 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
833 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
834 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
835 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
836 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
837 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
838 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
839 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
840 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
841 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
842 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
843 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
844 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
845 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
846 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
847 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
848 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
849 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
850 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
851 +l.Init();return l},ZLIB=ZLIB||{};
852 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
853 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
851 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
852 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
853 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
854 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
855 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
856 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
857 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
855 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
856 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
858 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
859 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
860 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
861 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
859 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
860 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
861 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
862 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
862 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
863 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
864 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
865 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
866 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
867 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
865 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
866 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
868 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
869 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
870 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
871 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
872 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -885,22 +888,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
888 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
889 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
890 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
888 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
889 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
890 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
891 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
892 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
891 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
892 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
893 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
894 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
895 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
896 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
897 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
898 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
899 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
900 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
898 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
899 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
901 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
902 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
903 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
901 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
902 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
903 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
904 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
905 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
906 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
907 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
908 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
909 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -916,16 +919,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
919 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
920 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
921 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
919 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
920 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
921 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
922 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
923 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
924 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
925 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
922 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
923 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
924 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
925 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
926 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
927 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
928 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
929 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
927 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
928 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\u8f7d\u5165\u4e2d...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
930 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
931 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>\u8f7d\u5165\u4e2d...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
932 StatusStrs=["\u65ad\u7ebf","\u6b63\u5728\u8fde\u7ebf...","\u8bbe\u5b9a...","\u8fde\u63a5\u7684"],t,t2,rsepass=null;
933 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
934 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR +\u4f4e\u9891":"\u5982\u679c";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -960,14 +963,14 @@ function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=T
963 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=["\uff0c \u63d2\u5165","\uff0c \u7535\u6c60"][v.PowerSource]);d+=TableEntry("\u529f\u7387",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>\u6ca1\u6709</i>":EscapeHtml(c);d+=TableEntry("\u540d\u79f0\u548c\u57df\u540d",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));
964 amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=TableEntry("\u7cfb\u7edf\u7f16\u53f7",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("\u7cfb\u7edf\u7f16\u53f7",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" \u5728\u7ba1\u7406\u5458\u63a7\u5236\u6a21\u5f0f\uff08ACM\uff09\u4e2d\u6fc0\u6d3b",
965 4==l.ProvisioningMode&&(n=" \u5728\u5ba2\u6237\u7aef\u63a7\u5236\u6a21\u5f0f\uff08CCM\uff09\u4e2d\u6fc0\u6d3b",b=9));d+=TableEntry("\u82f1\u7279\u5c14&reg;ME","v"+getItem(amtlogicalelements,"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,
963 -2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
964 -2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);p&&(e+="\uff0c\u91cd\u5b9a\u5411\u7aef\u53e3");q&&(e+="\uff0cLAN\u4e0a\u4e32\u884c");n&&(e+="\uff0cIDE\u91cd\u5b9a\u5411");h&&(e+="\uff0cKVM");""==e&&(e=" \u6ca1\u6709");d+=TableEntry("\u6d3b\u52a8\u529f\u80fd",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
966 +2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&
967 +2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);q&&(e+="\uff0c\u91cd\u5b9a\u5411\u7aef\u53e3");p&&(e+="\uff0cLAN\u4e0a\u4e32\u884c");n&&(e+="\uff0cIDE\u91cd\u5b9a\u5411");g&&(e+="\uff0cKVM");""==e&&(e=" \u6ca1\u6709");d+=TableEntry("\u6d3b\u52a8\u529f\u80fd",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&
968 amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="\u4e3b\u8981\u5c55\u793a",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["\u4e3b\u8981\u5c55\u793a","\u8f85\u52a9\u663e\u793a","\u7b2c\u4e09\u663e\u793a"][n.DefaultScreen]),e='<span title="'+format("\u9ed8\u8ba4\u8fdc\u7a0b\u663e\u793a\u4e3a{0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+="\uff0c\u542f\u7528\u7aef\u53e35900"),1==n.OptInPolicy&&(e+="\uff0c"+
969 n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"\u52a0\u5165\u79d2\u6570":"\u4e8c\u6b21\u9009\u62e9")),e+="\uff0c"+n.SessionTimeout+" \u5206\u949f"+(0<n.SessionTimeout?"s":"")+" \u4f1a\u8bdd\u8d85\u65f6",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&1))&&(e+="\uff0c\u5141\u8bb8\u4e0b\u6599"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("\u8fdc\u7a0b\u684c\u9762",addLinkConditional(e,
967 -"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u672a\u77e5\u72b6\u6001",p=amtsysstate.IPS_OptInService.response.OptInRequired,0==p&&(e="\u4e0d\u9700\u8981"),1==p&&(e="\u4ec5KVM\u9700\u8981"),4294967295==p&&(e="\u59cb\u7ec8\u9700\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
970 +"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="\u672a\u77e5\u72b6\u6001",q=amtsysstate.IPS_OptInService.response.OptInRequired,0==q&&(e="\u4e0d\u9700\u8981"),1==q&&(e="\u4ec5KVM\u9700\u8981"),4294967295==q&&(e="\u59cb\u7ec8\u9700\u8981"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&
971 (e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("\u7528\u6237\u540c\u610f",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"\u672a\u77e5",1:"\u5176\u4ed6",2:"\u5df2\u542f\u7528",3:"\u6b8b\u969c\u4eba\u58eb",4:"\u5173\u673a",5:"\u4e0d\u9002\u7528",6:"\u5df2\u542f\u7528\u4f46\u79bb\u7ebf",7:"\u6d4b\u8bd5\u4e2d",8:"\u9012\u5ef6",9:"\u505c\u987f",10:"\u5f00\u59cb",32768:"OCR Disabled",32769:"OCR Enabled",
972 32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"\u672a\u77e5",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&
970 -"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("\u7535\u6e90\u653f\u7b56",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u7ea6\u4f1a\u65f6\u95f4",addLinkConditional((new Date((new Date).getTime()+
973 +"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("\u7535\u6e90\u653f\u7b56",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("\u7ea6\u4f1a\u65f6\u95f4",addLinkConditional((new Date((new Date).getTime()+
974 amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("\u7535\u6e90\u52a8\u4f5c...","showPowerActionDlg()")+" ";e+=AddButton("\u4fdd\u5b58\u72b6\u6001...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+
975 TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" \u66f4\u6539\u7f51\u7edc\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u5bfc\u81f4\u6b64\u9875\u9762\u4e0d\u53ef\u7528\u3002");d=d+"<br><h2>\u5e38\u89c4\u8bbe\u7f6e</h2>"+TableStart();e="";"<i>\u6ca1\u6709</i>"!=c&&(1==v.SharedFQDN&&(e="\uff0c\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u5171\u4eab"),0==v.SharedFQDN&&(e="\uff0c\u4e0d\u540c\u4e8eOS"));d+=TableEntry("\u540d\u79f0\u548c\u57df\u540d",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c=
976 "\u6b8b\u969c\u4eba\u58eb";1==v.DDNSUpdateEnabled?c="\u6bcf\u4e2a\u542f\u7528"+v.DDNSPeriodicUpdateInterval+" \u5206\u949f\uff0cTTL\u4e3a"+v.DDNSTTL+" \u5206\u949f":1==v.DDNSUpdateByDHCPServerEnabled&&(c="\u901a\u8fc7DHCP\u670d\u52a1\u5668\u66f4\u65b0");d+=TableEntry("\u52a8\u6001DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==
@@ -977,8 +980,8 @@ a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){
980 xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==
981 xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"\u5df2\u542f\u7528":"\u6b8b\u969c\u4eba\u58eb","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("\u56de\u5e94ping",addLinkConditional(["\u6b8b\u969c\u4eba\u58eb","ICMP\u56de\u5e94","RMCP\u54cd\u5e94","ICMP\u548cRMCP\u54cd\u5e94"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),e=
982 1==c.DHCPEnabled?"\u81ea\u52a8\u4f7f\u7528DHCP\u670d\u52a1\u5668":"\u9759\u6001IP\u5730\u5740",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4\u72b6\u6001",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4\u5730\u5740",isIpAddress(c.IPAddress,"\u6ca1\u6709"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4\u7f51\u5173/\u63a9\u7801",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"\u6ca1\u6709")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&
980 -(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4\u57df\u540d\u670d\u52a1\u5668",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="\u6b8b\u969c\u4eba\u58eb",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||
981 -isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u542f\u7528\u7684\u81ea\u52a8\u548c\u624b\u52a8\u5730\u5740":"\u542f\u7528\u7684\u81ea\u52a8\u5730\u5740");d+=TableEntry("IPv6\u72b6\u6001",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+="\uff0c"),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];
983 +(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4\u57df\u540d\u670d\u52a1\u5668",e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="\u6b8b\u969c\u4eba\u58eb",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||
984 +isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"\u542f\u7528\u7684\u81ea\u52a8\u548c\u624b\u52a8\u5730\u5740":"\u542f\u7528\u7684\u81ea\u52a8\u5730\u5740");d+=TableEntry("IPv6\u72b6\u6001",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+="\uff0c"),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];
985 d+=TableEntry("IPv6\u5730\u5740",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6\u5730\u5740","\u6ca1\u6709");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6\u9ed8\u8ba4\u8def\u7531\u5668",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6\u57df\u540d\u670d\u52a1\u5668",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&
986 (-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
987 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
@@ -1026,8 +1029,8 @@ function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AM
1029 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"\u6b8b\u969c\u4eba\u58eb":"\u5df2\u542f\u7528",c&2&&(b+="\uff0c\u5df2\u9501\u5b9a"),c&4&&(b+="\uff0c \u51e0\u4e4e\u6ee1"),c&8&&(b+="\u6ee1"),c&16&&(b+="\uff0cNoKey"),c="<h1>\u5ba1\u6838\u65e5\u5fd7\u8bbe\u7f6e</h1>"+TableStart(),c+=TableEntry("\u5dde",b),c+=TableEntry("\u5b58\u50a8",a[0].CurrentNumberOfRecords+" \u8bb0\u5f55\uff09\uff0c"+a[0].PercentageFree+"\uff05 \u81ea\u7531"),c+=TableEntry("\u8986\u5199\u653f\u7b56",
1030 2==a[0].OverwritePolicy?"\u88c5\u6ee1\u65f6\u81ea\u52a8\u5305\u88c5":"\u6c38\u4e0d\u8986\u76d6"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1031 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="\u8fc7\u6ee4" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("\u6551...","SaveAuditLog()")+AddButton("\u6e05\u9664\u65e5\u5fd7","ClearAuditLog()"))+"<br>");if(0==c.length)d="\u627e\u4e0d\u5230\u5ba1\u6838\u65e5\u5fd7\u4e8b\u4ef6\u3002";else{var e=
1029 -0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u65f6\u95f4</b><td class=r1 style=width:260px><b>\u53d1\u8d77\u4eba</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\uff0c"+v.Event);null!=v.ExStr&&(n+="\uff0c"+v.ExStr);""!=
1030 -l&&""!=p&&(l+="\uff0c");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1032 +0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>\u65f6\u95f4</b><td class=r1 style=width:260px><b>\u53d1\u8d77\u4eba</b><td class=r1><b>Action</b>";for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+="\uff0c"+v.Event);null!=v.ExStr&&(n+="\uff0c"+v.ExStr);""!=
1033 +l&&""!=q&&(l+="\uff0c");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}
1034 function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","\u82f1\u7279\u5c14AMT\u5ba1\u6838\u65e5\u5fd7",auditLog)}function ClearAuditLog(b){QH(60,"\u6e05\u9664\u5ba1\u6838\u65e5\u5fd7\uff1f");setDialogMode(1,"\u5ba1\u6838\u65e5\u5fd7",3,ClearAuditLogEx)}
1035 function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("\u5ba1\u6838\u65e5\u5fd7","\u9519\u8bef\uff1a"+d)}
1036 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("\u65f6\u95f4",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("\u53d1\u8d77\u4eba",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("\u5730\u5740",a.NetAddress));d+=addHtmlValue("\u5e94\u7528",a.AuditApp);d+=addHtmlValue("\u4e8b\u4ef6",a.Event);if(null!=a.ExStr)d+=addHtmlValue("\u6269\u5c55\u6570\u636e",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=
@@ -1080,7 +1083,7 @@ function PullWatchdogResponse(b,c,a,d){if(200==d&&200==a.AMT_AgentPresenceCapabi
1083 function updateWatchdog(){if(null!=xxWatchdog){var b;b=""+TableStart();b+=TableEntry("\u6700\u5927\u770b\u95e8\u72d7",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalAgents+" \u76d1\u5bdf\u8005");b+=TableEntry("\u6700\u5927\u603b\u52a8\u4f5c",xxWatchdog.AMT_AgentPresenceCapabilities.response.MaxTotalActions+" \u884c\u52a8");b+=TableEnd()+"<br>";b+=TableStart2();b+="<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u82f1\u7279\u5c14&reg;AMT\u4ee3\u7406\u72b6\u6001\u76d1\u89c6\u7a0b\u5e8f\u3002<br><br>";
1084 if(null==xxWatchdog.AMT_AgentPresenceWatchdog.responses||0==xxWatchdog.AMT_AgentPresenceWatchdog.responses.length)b+="<div style=padding-left:15px><i>\u627e\u4e0d\u5230\u4ee3\u7406\u4eba\u72b6\u6001\u76d1\u89c6\u7a0b\u5e8f\u3002</i></div><br>";else for(var c in xxWatchdog.AMT_AgentPresenceWatchdog.responses){var a=xxWatchdog.AMT_AgentPresenceWatchdog.responses[c],d=guidToStr(rstr2hex(atob(a.DeviceID)));a.MonitoredEntityDescription&&""!=a.MonitoredEntityDescription&&(d=EscapeHtml(a.MonitoredEntityDescription));
1085 b+="<div class=itemBar onclick=showWatchdogDetails("+c+')><input type=button style=float:right value="\u6dfb\u52a0\u52a8\u4f5c..." onclick=addWatchdogAction(event,'+c+")>";a.transitions&&(b+='<input type=button style=float:right value="\u5220\u9664\u52a8\u4f5c..." onclick=deleteWatchdogActions(event,'+c+")>");b+="<div style=padding-top:3px><b>"+d+"</b>, "+amtstack.WatchdogCurrentStates[a.CurrentState]+"</div>";var d="",e;for(e in a.transitions){var v=a.transitions[e];""!=d&&(d+="<br>");d+=getWatchdogTransitionStr(v.OldState)+
1083 -" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+="\uff1a\u8981\u8bb0\u5f55\u7684\u4e8b\u4ef6")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u6dfb\u52a0\u770b\u95e8\u72d7...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1086 +" &rarr; "+getWatchdogTransitionStr(v.NewState);v.actions&&1==v.actions[0].EventOnTransition&&(d+=" \uff1a\u8981\u8bb0\u5f55\u7684\u4e8b\u4ef6")}""!=d&&(b+="<div style=padding:12px>"+d+"</div>");b+="</div>"}b=b+"<br>"+TableEnd(AddRefreshButton("PullWatchdog()")+AddButton("\u6dfb\u52a0\u770b\u95e8\u72d7...","AddWatchdog()"));b+="<br>";QH(54,b)}}
1087 function getWatchdogTransitionStr(b){if(31==b)return"\u4efb\u4f55\u56fd\u5bb6";var c="",a;for(a in amtstack.WatchdogCurrentStates)0!=(b&a)&&(c+=", "+amtstack.WatchdogCurrentStates[a]);return c.substring(2)}
1088 function showWatchdogDetails(b){b=xxWatchdog.AMT_AgentPresenceWatchdog.responses[b];var c="";b.MonitoredEntityDescription&&""!=b.MonitoredEntityDescription&&(c+=addHtmlValue("\u63cf\u8ff0",EscapeHtml(b.MonitoredEntityDescription)));c+=addHtmlValue("\u53d7\u76d1\u63a7\u5b9e\u4f53",watchdogMonitoredEntity[b.MonitoredEntity]);c+=addHtmlValue("\u5f53\u524d\u72b6\u6001",amtstack.WatchdogCurrentStates[b.CurrentState]);c+=addHtmlValue("\u542f\u7528\u72b6\u6001",watchdogEnabledStates[b.EnabledState]);c+=
1089 addHtmlValue("\u542f\u52a8\u95f4\u9694",b.StartupInterval+" \u79d2");c+=addHtmlValue("\u8d85\u65f6\u95f4\u9694",b.TimeoutInterval+" \u79d2");setDialogMode(11,format("\u770b\u95e8\u72d7{0}",guidToStr(rstr2hex(atob(b.DeviceID)))),5,showWatchdogDetailsOk,c,b)}function showWatchdogDetailsOk(b,c){2==b&&amtstack.Delete("AMT_AgentPresenceWatchdog",{DeviceID:c.DeviceID},PullWatchdog)}
@@ -1180,7 +1183,7 @@ AddRefreshButton("xxAccountFetch=999;PullUserInfo()");xxAccountAdminName&&(c+=Ad
1183 function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1184 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"\u7f16\u8f91\u8d26\u6237",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1185 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"\u65b0\u8d26\u6237",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1183 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u5e10\u6237\u9519\u8bef","\u65e0\u6548\u7684\u53c2\u6570");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==
1186 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("\u5e10\u6237\u9519\u8bef","\u65e0\u6548\u7684\u53c2\u6570");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==
1187 b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1188 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">\u7ba1\u7406\u5458</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1189 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["\u4ec5\u672c\u5730","\u4ec5\u7f51\u7edc","\u5168\u90e8\uff08\u672c\u5730\u548c\u7f51\u7edc\uff09"];
@@ -1198,8 +1201,8 @@ b+".txt")}delete terminal.m.capture;c3.value="\u5f00\u59cb\u6355\u6349"}}functio
1201 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1202 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1203 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1201 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1202 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1204 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1205 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1206 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("\u6570\u636e\u901a\u9053",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=
1207 !0;webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1208 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1210,14 +1213,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1213 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1214 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1215 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"\u8fde\u63a5":"\u65ad\u5f00";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","The device indicated that this type of connection of not supported."):
1213 -5E4==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1214 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uff0c\u8f6fKVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u8fdc\u7a0b\u684c\u9762\u8bbe\u7f6e",3,showDesktopSettingsChanged))}
1216 +5E4==b.disconnectCode?messagebox("\u8fdc\u7a0b\u684c\u9762","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("\u8fdc\u7a0b\u684c\u9762","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");
1217 +break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1218 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b="\uff0c\u8f6fKVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"\u8fdc\u7a0b\u684c\u9762\u8bbe\u7f6e",3,showDesktopSettingsChanged))}
1219 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1220 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1217 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1218 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1219 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1220 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1221 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1222 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1223 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1224 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1225 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1226 "8px"),center()))}
1227 function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"\u8fdc\u7a0b\u952e\u76d8\u8f93\u5165",3,showDeskTypeEx,'<div>\u8f93\u5165\u6587\u672c\uff0c\u7136\u540e\u5355\u51fb\u201c\u786e\u5b9a\u201d\u4ee5\u4f7f\u7528\u7f8e\u5f0f\u82f1\u8bed\u952e\u76d8\u8fdc\u7a0b\u8f93\u5165\u6587\u672c\u3002\u5728\u7ee7\u7eed\u64cd\u4f5c\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5c06\u8fdc\u7a0b\u5149\u6807\u653e\u7f6e\u5728\u6b63\u786e\u7684\u4f4d\u7f6e\u3002<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
@@ -1228,13 +1232,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1232 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1233 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1234 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1231 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1235 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1236 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1237 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1238 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1235 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u6839</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1236 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1237 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1239 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>\u6839</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1240 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1241 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1242 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1243 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1244 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1361,10 +1365,10 @@ addOption("d5actionSelect","\u542f\u52a8BIOS",100),b&1&&addOption("d5actionSelec
1365 "\u5f00\u542fPXE",401);addOption("d5actionSelect","\u81ea\u5b9a\u4e49\u52a8\u4f5c...",999);5<amtversion&&addOption("d5actionSelect","\u7528\u6237\u540c\u610f...",998);setDialogMode(5,"\u6743\u529b\u884c\u52a8",3,powerActionDlgCheck)}else messagebox("\u6743\u529b\u884c\u52a8",format("\u65e0\u6cd5\u83b7\u5f97\u7cfb\u7edf\u529f\u80fd\uff0c\u9519\u8bef{0}",d))}
1366 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"\u7535\u6e90\u64cd\u4f5c\u5df2\u5b8c\u6210\u3002"):QH(60,format("\u7535\u6e90\u64cd\u4f5c\u9519\u8bef\uff03{0}\u3002",e));setDialogMode(1,"\u6743\u529b\u884c\u52a8",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="\u786e\u8ba4\u6267\u884cIntel&reg;\u8fdc\u7a0b\u5b89\u5168\u64e6\u9664\uff1f<br>\u5982\u679c\u9700\u8981\uff0c\u8f93\u5165\u5b89\u5168\u64e6\u9664\u5bc6\u7801\u3002<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>\u5bc6\u7801</div></div><br><div style=color:red><b>\u8b66\u544a</ b>\uff1a\u8fd9\u5c06\u64e6\u9664\u8fdc\u7a0b\u7cfb\u7edf\u4e0a\u7684\u6570\u636e\u3002</div>",
1367 rsepass=1,setDialogMode(11,"\u6743\u529b\u884c\u52a8",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1364 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a</ b>\uff1a\u8fd9\u5c06\u64e6\u9664\u8fdc\u7a0b\u7cfb\u7edf\u4e0a\u7684\u6570\u636e\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");
1365 -d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");
1366 -1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,
1367 -"\u6743\u529b\u884c\u52a8",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1368 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>\u8b66\u544a</ b>\uff1a\u8fd9\u5c06\u64e6\u9664\u8fdc\u7a0b\u7cfb\u7edf\u4e0a\u7684\u6570\u636e\u3002</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1369 +d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1370 +a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"\u6743\u529b\u884c\u52a8",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1371 +function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1372 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u68c0\u67e5\u72b6\u6001..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1373 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("\u6743\u529b\u884c\u52a8","\u6b63\u5728\u68c0\u67e5\u72b6\u6001...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&
1374 8==b&&(c=!1);13!=currentView&&10>=b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1400,10 +1404,10 @@ function powerActionResponse4(b,c,a,d){200==d&&(QH(60,"\u7535\u6e90\u64cd\u4f5c\
1404 function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1405 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1406 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1403 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1404 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u6b64\u8ba1\u7b97\u673a\u7684\u82f1\u7279\u5c14&reg;AMT\u5b58\u50a8\u3002<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,
1405 -n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+"\u6839";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\u4e0b\u8f7d","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" \u4e2a\u5b57\u8282</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&
1406 -xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u6587\u4ef6\u3002</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+
1407 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1408 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u6b64\u8ba1\u7b97\u673a\u7684\u82f1\u7279\u5c14&reg;AMT\u5b58\u50a8\u3002<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,
1409 +n=q,e=""!=c?e+EscapeHtml(c+" / "+q):e+"\u6839";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("\u4e0b\u8f7d","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" \u4e2a\u5b57\u8282</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&
1410 +xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>\u627e\u4e0d\u5230\u6587\u4ef6\u3002</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+
1411 TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("\u4e0a\u8f7d...","UploadToStorage()"):""));QH(55,a)}else QH(55,"\u65e0\u6cd5\u52a0\u8f7d\u5b58\u50a8\u6570\u636e...<br/>"+AddButton("\u5237\u65b0","PullStorage()"))}
1412 function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("\u4f9b\u5e94\u5546",b));""!=c&&(e+=addHtmlValue("\u5e94\u7528",c));e+=addHtmlValue("\u540d\u79f0",a);e+=addHtmlValue("\u5c3a\u5bf8",v.size+" bytes");v.link&&(e+=addHtmlValue("\u94fe\u63a5",v.link));setDialogMode(11,"\u50a8\u5b58\u7269\u54c1",5,showStorageDetailsEx,e,d)}}
1413 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("\u5b58\u50a8",format("\u65e0\u6cd5\u5220\u9664\u6587\u4ef6\uff08ERR {0}\uff09\uff0c\u8bf7\u68c0\u67e5\u8ba1\u7b97\u673a\u662f\u5426\u5df2\u6253\u5f00\u7535\u6e90\u3002",c)):PullStorage()}
@@ -1418,7 +1422,7 @@ function SetStorageName(b){b||(b=Q("mstoragefile"),b=1==b.files.length?b.files[0
1422 b}
1423 function UploadToStorageEx2(b){var c;c=Q("mstoragevendor").value;var a=Q("mstorageapplication").value,d=Q("mstoragefilename").value;""==d&&(d="Filename");var e=Q("mstoragetype").value;""==e&&(e="application/octet-stream");var v=Q("mstoragelink").value;""!=c||""!=a||"logon.htm"!=d.toLowerCase()&&"index.htm"!=d.toLowerCase()?(""==c&&(c="Vendor"),""==a&&(a="App"),c=c+"/"+a+"/"+d):c=d.toLowerCase();a="<metadata><headers>";d=b.target.filename;d||(d=Q("mstoragefile").files[0].name);d.endsWith(".gz")&&(a+=
1424 "<h>Content-Encoding: gzip</h>");a+="<h>Content-Type: "+e+"</h></headers>";""!=v&&(a+="<link>"+v+"</link>");a+="</metadata>"+b.target.result;PushToStorage(c,a)}function _fmtdatetime(b){return b.replace("T"," ").replace("Z","")}
1421 -function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u5929").replace("H"," \u5c0f\u65f6").replace("M"," \u5206\u949f");b=b.replace(" 1\u5929"," 1\u5929").replace(" 1\u5c0f\u65f6"," 1\u5c0f\u65f6").replace(" 1\u5206\u949f"," 1\u5206\u949f");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1425 +function _fmtinterval(b){b=b.replace("T","").substring(b.indexOf("P")+1);b=" "+b.replace("D"," \u5929").replace("H"," \u5c0f\u65f6").replace("M"," \u5206\u949f");b=b.replace(" 1\u5929"," 1\u5929").replace(" 1\u5c0f\u65f6"," 1\u5c0f\u65f6").replace(" 1\u5206\u949f "," 1\u5206\u949f ");return b.substring(0,b.length-1)}function _fmttimepad(b){for(b=""+b;2>b.length;)b="0"+b;return b}var xxAlarms=null;
1426 function PullAlarms(){var b=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>\u7ba1\u7406\u5524\u9192\u8b66\u62a5\u3002<br><br>";amtstack.Enum("IPS_AlarmClockOccurrence",function(c,a,d,e){if(200==e){QV("go23",!0);if(0<d.length)for(xxAlarms=d,c=0;c<d.length;c++)a="<b>"+d[c].ElementName+"</b>, \u9192\u6765 "+(new Date(d[c].StartTime.Datetime)).toLocaleString().replace(", "," \u5728"),void 0!=d[c].Interval&&(a+=" \u548c\u6bcf\u4e2a"+_fmtinterval(d[c].Interval.Interval)),1==d[c].DeleteOnCompletion&&
1427 (a+="\uff0c\u5b8c\u6210\u540e\u5220\u9664"),b+="<div class=itemBar onclick=showAlertDetails("+c+")><div style=float:right>",xxAccountAdminName&&(b+=" "+AddButton2("\u7f16\u8f91...",'showAddAlarm(" + i + ")')),b+="</div><div style=padding-top:3px;width:auto;float:left;overflow-x:hidden>"+a+"</div></div>";else xxAlarms=null,b+="<div style=padding-left:15px><br><i>\u6ca1\u6709\u6ce8\u518c\u5524\u9192\u8b66\u62a5\u3002</i></div><br>";d="<div>&nbsp;"+AddRefreshButton("PullAlarms()");xxAccountAdminName&&
1428 (d+=AddButton("\u5220\u9664\u6240\u6709\u8b66\u62a5","RemoveAllAlarms()")+AddButton("\u52a0","showAddAlarm()"));b+="<br><td class=r1>"+TableEnd(d+"</div>");QH(57,b)}},null,!0)}
public/commander.htm
+617 -614
@@ -1,4 +1,4 @@
1 -<!DOCTYPE html><html lang="en" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()"><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Connect onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>System Status</a><p id=go14 class=nav1 onclick=go(14)><a>Remote Desktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Files</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware Information</a><p id=go6 class=nav1 onclick=go(6)><a>Event Log</a><p id=go15 class=nav1 onclick=go(15)><a>Audit Log</a><p id=go21 class=nav1 onclick=go(21)><a>Storage</a><p id=go8 class=nav1 onclick=go(8)><a>Network Settings</a><p id=go17 class=nav1 onclick=go(17)><a>Internet Settings</a><p id=go16 class=nav1 onclick=go(16)><a>Security Settings</a><p id=go19 class=nav1 onclick=go(19)><a>Agent Presence</a><p id=go18 class=nav1 onclick=go(18)><a>System Defense</a><p id=go11 class=nav1 onclick=go(11)><a>User Accounts</a><p id=go22 class=nav1 onclick=go(22)><a>Subscriptions</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R Session" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blocks are 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blocks are 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">&#x2716;</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>This computer's firmware should be updated,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>please check here</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Loading...</h1></div><div id=p1 style=display:none><h1>System Status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware Information</h1><span id=16></span></div><div id=p6 style=display:none><h1>Event Log</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Network Settings</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>User Accounts</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN Browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Query style=margin:4px onclick=wsmanQuery()><input type=button value=Clear style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN Terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or Serial-over-LAN feature is disabled<span id=26>, click here to enable it.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=CR+LF title="Toggle what the return key will send" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Toggle terminal size" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Paste disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Remote Desktop</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=37>, click here to enable it.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Rotate Left" onclick=drotate(-1)>&olarr;</div><div class=rb title="Rotate Right" onclick=drotate(1)>&orarr;</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Toggle full screen mode" onkeypress="return false" onkeydown="return false" value=Full onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value=Save... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Settings... title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;&#x2716;</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Disconnected.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onmousewheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Win<option value=1>Win+Down<option value=2>Win+Up<option value=3>Win+L<option value=4>Win+M<option value=20>Win+R<option value=23>Win+Left<option value=24>Win+Right<option value=5>Shift+Win+M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Blank Screen&nbsp;</span><span id=47><input id=48 type=checkbox>View only&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Audit Log</h1><span id=50></span></div><div id=p16 style=display:none><h1>Security Settings</h1><span id=51></span></div><div id=p17 style=display:none><h1>Internet Settings</h1><span id=52></span></div><div id=p18 style=display:none><h1>System Defense</h1><span id=53></span></div><div id=p19 style=display:none><h1>Agent Presence</h1><span id=54></span></div><div id=p21 style=display:none><h1>Storage</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event Subscriptions</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Files</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Up>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Select All" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Delete onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="New Folder" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Upload onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cut onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copy onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Paste onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Refresh onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&checkmark;</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&#10007;</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>&#x2716;</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Username</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Password*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirm Password</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Network<option value=2>Any</select><div>Permission</div></div><div>Granted Permissions</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*Minimum 8 characters with upper, lowercase, 0-9, and one of !@#$%^&amp;*()+-</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Power Action</div></div><div><span style=color:red>Warning:</span>Some power actions may result in data loss and may disconnect the desktop, terminal or disk redirection sessions.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Consent Code</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primary display<option value=1>Secondary display<option id=d6ThirdDisplay value=2 style=display:none>Third display</select><div>Consent Display</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Image Encoding</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><span id=d7decimationspan><label><input type=checkbox id=d7decimation>Prefer Downscale</label><br></span><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br><label><input type=checkbox id=d7showcad>Show Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Limit Frame Rate</label><br><label><input type=checkbox id=d7noMouseRotate>Don't Rotate Mouse</label><br></div><div>Other Settings</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Quality</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Scaling</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Username</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Password</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Redirection Port</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Not Required<br></label><label><input type=radio name=d10 id=c20 value=1>Required for KVM only<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Always Required<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Profile Name</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priority</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Authentication</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>None</select><div>Encryption</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Password*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Confirm Password</div></div></div><div id=dialog19 style=margin:auto;margin:3px>This will save the entire state of Intel&reg; AMT for this machine into file. Passwords will not be saved, but some sensitive data may be included.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabled<br><input type=radio name=d20 id=d20b value=1>ICMP response<br><input type=radio name=d20 id=d20c value=2>RMCP response<br><input type=radio name=d20 id=d20d value=3>ICMP & RMCP response<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Operating system IP address sync</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP address</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnet mark</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Gateway</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primary DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternate DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabled<option value=1>Disabled, DHCP update<option value=2>Enabled</select><div>Dynamic DNS client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Update Interval (minutes)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (seconds)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minutes, Default TTL is 900 seconds.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Reset<option value=5>Power cycle<option value=8>Power down<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS Power Saving<option value=999>Set boot options</select><div>Remote Command</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Enforce Secure Boot</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Force progress events</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Lock power button</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Lock reset button</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Lock sleep button</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Lock keyboard</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS password bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Safe mode</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel&reg; Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel&reg; ME Settings</label><br></div></div><div>Boot Settings</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option id=ForceDVDBootOption value=1>Force CD/DVD Boot<option id=ForcePXEBootOption value=2>Force PXE Boot<option id=ForceHDBootOption value=3>Force Hard Disk Boot<option id=ForceDiagBootOption value=4>Force Diagnostic Boot</select><div>Boot Source</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Boot to CDROM</select><div>IDER Boot Device</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>System Default<option id=c46 value=1>Quiet<option id=c47 value=2>Verbose<option id=c48 value=3>Blank Screen</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE Password</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarm name</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Wake date (year-month-day)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Wake time (hour:min:sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Interval (days-hours-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Keep alarm<option value=1>Delete on completion</select></div><div style=padding-top:4px>After wake</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Enabled<br></label><label><input type=radio name=d26b id=c50 value=0>Disabled<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Enabled<br></label><label><input type=radio name=d26a id=c52 value=0>Disabled<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Delete style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
1 +<!DOCTYPE html><html lang="en" style=height:100%><head><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8" http-equiv=Content-Type><meta name=format-detection content="telephone=no"><link rel="icon" type=image/png href="data:image/png;base64,iVBORw0KGgo="><style>body{height:100%;max-height:100%;overflow:hidden;font-family:arial, helvetica, sans-serif;font-size:9pt;color:black;background:white;margin-top:0;margin-left:0;margin-right:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}li{margin:0;padding:0;} a:visited{text-decoration:none;color:#04f;}a:link{text-decoration:none;color:#04f;}a:hover{color:#a32;}h1{font-size:11pt;font-weight:bold;color:black;margin-left:5px;margin-top:10px;margin-bottom:6px;}h2{font-size:9pt;font-weight:bold;color:black;margin-left:6px;margin-top:6px;margin-bottom:0;}p{margin-left:6px;margin-top:4px;margin-bottom:0;margin-right:2px;}td{font-size:9pt;}th{font-size:9pt;}th:hover{cursor:pointer;background:#aaa;}.header{position:fixed;top:0;left:0;right:0;height:24px;background:#c0c0c0;}.progressbar{position:fixed;top:24px;left:0;right:0;height:2px;background:#ff9e30;}.in{margin-left:40px;}.log{background:#bbbab5;}.log1{background:#bbbab5;}.log tbody tr:nth-child(odd){background:#e8eefe;}.fullcell{position:fixed;top:26px;right:0;bottom:0;left:0px;overflow:hidden;}.maincell{position:fixed;top:26px;right:0;bottom:0;left:156px;overflow:auto;padding-left:2px;vertical-align:top;}.navbar{position:fixed;top:26px;left:0;bottom:0;width:156px;border-right:2px solid #ff9e30;vertical-align:top;background:#72726f;background:linear-gradient(45deg, #72726f 0%,#a6a5a0 100%);}.nav1{padding:1px 0px 1px 8px;margin:0px;font-weight:bold;color:black;white-space:nowrap;cursor:pointer;}.nav2{margin-left:32px;margin-top:0;color:black;cursor:pointer;}.r{font-size:11pt;}.r0{background:white;}.r1{border-bottom:1px solid gray;text-align:left;}.r2{text-align:left;}.r3{border-bottom:1px solid gray;text-align:left;}.r3:hover{background-color:#83827b;cursor:pointer;}.spread{height:100%;width:100%;background-color:white;}.timer{border:1px solid #abcae1;background-color:#abcae1;}.tm{font-size:7pt;}.top1{font-size:14pt;font-weight:bold;color:white;margin-top:11px;}.top2{color:white;}.warn{font-weight:bold;color:#c00000;}.icon1{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMISURBVHjadJPPb9t0GMY//rbJaEKSxoPFQQ1WxhQ7RaGoIDEpTBMqgk7iBvwNKJdJXDnssEMl7pMGfwOH9YBYh0AglYiBBNKa0cSGNpiRxs7aJE2aH7aTmkPXqTvwXt7L8z56pef5SEEQcHYMwyjWarX3rLr1tu3YOQAlpZhqVv1J1/VvNU0rn9VLpwbtdlspb5ZLNdNcuZBKF1NKmuS8DECn28axm7ScZlnP5b4vXinelmXZfmrQbreVjbsbN3r9YSmTLbA/Ps92K8FgFAbAdYcsLXRRk10af/9BPBa5vXpt9aYsy7YAKG+WS73+sJS+eJmKneZe5QWEiHHreoJb1xNEInHu/Bzw3cM45zNv0usPS+XNcglAGIZRrJnmSiZbYOtRhF93ZvHcHoPRlN3GkL4Ho5HHeOxRqbv8sHVM+uVFaqa5YhhGUVpfXw+6hwP86DJ3fgkzK44hOGZuLkH7KIQIxuw9dkk812Hqu0wmPh9djZIKG8wnogirbpFS0jy0YOqPcMcurjvh3Vc7fPHpHF9//iLLyja75p/sNWxazj73t9qklDRW3ULYjk1yXmb3Xw/P9fA9n35/AMD0yAIgGQ8zOtxnMhFM/ClG/YjkvIzt2Mye5un5Lr4HY9el5RwA2tOsY9FzCCFBICCYOdlPRigphU63jZKEwWDAweMDJt7kmXINBhOkIEAQQiLMpczzJzcpBaFmVRy7iZ4RdA/7TKcBknTymOd5APT6PiAhghlmpHO8ocdw7CZqVkXour7Ycppriwsuy7koEgKQANDy+dPCIokQkhTiciFG4aJPy2mu6bq+OKtpWlXPmZWGtc2H77yOhOD+gxE7//T45sdHzEjQ7Y0IgmPeKszxwdUwTuM39Fyuomla9bTKyY27Gx/3+sMvlYU8lXqI36sef+1UkCS4pMZZyuu89oqL09gmHot8snpt9StZljtnYUqWN8vv10yzcCGV/ux/YFrTc7lK8UrxnizLnWdoPINzvlarLVl1K2879ktPcN5Ts2pV1/UHmqZVz+r/GwBWYYCoNUz0KwAAAABJRU5ErkJggg==");}.icon2{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAIuSURBVHjalJNBTBNBFIb/2S4tlliFdLBNW0mktibaeivBm9eejFeDZw81kROXHj2SyIEDB65wI3iBI5iYmEjSREtIpI1tQdOm20KBdkuX3ZnnYUVq2Cb6kklm3vxv3vdm3oCI4DTazZ3p3HpM5NZjot3cmR6kY0QEJ9vdnNJcaoMP3xyB3vI2EunP4046xcl5WttK99olHn4URSA2AaNT5qe1rbST1pFgd3NKU93H/P6TJADg8GthIMU1gqODtZlep8QjiegfXzBuUxwdrM1cy9Z/IVIYSn4jpe1vx8jsviAABIBM/Tl9/5Sg/EZKk8JQ+mP+ImiUVjJGp8xDDycB2b1KIgSC0RCMTpk3SisZxxKkpXvqhaXs7aAfnhtukBBXKmFCHVLgj4yjXljKSkv3XDugXlyeM/QKDz24CxIWSJhXBKYJMk2MT3AYeoXXi8tzl3sqAFgXLV+zvJrxhzkUqwdxQQARZl+FbbqeXY7CGHjEj2Z5NcMnXy6o7tEzRkT4mX/7Tisuvok/joBJC5ACl8/LmAIov0EVBZIYvn35gUD89UI4mZ1lRrca2N9+lh8bPeG3RgCyTEBKgAi+1CEAoJ27B6gqGGMAY2idCbRORhvxp++TanVvviaMQ/g8XshzAxACIIn+/pLGOWAqYIoLAODzuKB1K7y6N19j+Y0U3fG3MCw6IMsCyM4Oxvob1l4ze84YQ5u8OD7jUNWhMXz4uI//tx4Syfjg3/iv9msAKbs79bi84QcAAAAASUVORK5CYII=");}.icon3{width:14px;height:15px;background-repeat:no-repeat;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAEZ0FNQQAAsY58+1GTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAANGSURBVHjadJNNTBwFAIW//UFWfrbsgDuzBTvu0s6OWhHwYMhCOEAbSESC4dpL07TFg9GkxIRDjT3YhEBNPUjC0SbaJjVNQyJQaxtDpzYmlDYUOjuUrhspO0N0gQVWl/0ZD5ZmPfiSd3t5l/c+h23bFCsajR7Rdf1GPBbHtEwAJFFCDsqoqno0HA7/WJx37BUkk8k6bUYb0g2jxy8G6kQpgK9KAGB9I4llJlizEiuqokxE2iJfCIKw8qIgmUzWTU1OfZXaSve9KQep3tzA9fQJhfhvZHd3yfl85OUg26F6os9W8FaWXevq7vpIEIQVJ4A2ow2lttJ9LTU1hH64Tt1qHHv8a0rnH/LS4iPsK9/iixnUXr1Ck3cfqa10nzajDQG4o9HoEd0wet493Ij/zm18n3yMJxQivbND7Px58thUD3xI+egoBcMgd+FLlO73mTUWe5Ro9Jqrs7Nz2eUu9YbSacriT8lms5Q3NlLR3s6uaVJQFISRC1SUuFm9dInJ6WlCfpGMFPBub6eOueOxOMobb+H4+Ta/f3cZz927FPJ5hOPHqRkZgT/+xFniIjY6yveDg0gOB9l6BbHpBMbiPE7TMvFVCWSXl3DU7secnWXu9GniFy+ymctRIfhYHxvj6pkzBG2bA0Du8SN8VQKmZeLc2zOXybA2P8+mbeNpbydTWUmJ203etvGIInV+PxVA9t/pXvzALYkS6xtJqoRq/rJtqoNB/KdO8Up/P+atWxSA8t5e3vN6mT55kgOrq5TUH2J9I4kkSjjloIxlJiiEDiK2tREYHkbq7yd57x6XOzr4paMD59IS+7q7+WB8nPtuNyVN72CZCeSgjFNV1dY1K6H9fbiBDWk/uwsL5G7e5JuWFhTgVUBrbmZX11memyMgv0a64W3WrISmqmqrw7ZtJq5PfP4sYZ0Nl5ayPjJM4fECKdtGAF5+bt3pxBt+HWXwU37NZKgNiOd6ens+27uyNDU5dTa1lR44JAXwPHiA/fA++ScGTsB1UMHV1MxOQyOGmcBbWTbW1d11ThAEsxgmSZvRBnTD6PCLgcj/wKSpivJTpC0yJgiC+R8ai3CO6Lp+NB6Lt5qWqTzH2ZCD8h1VVW+Ew2GtOP/PAFZGexs+cGPjAAAAAElFTkSuQmCC");}.itemBar{padding:7px;min-height:20px;margin-top:4px;margin-right:8px;width:auto;border-radius:8px;background-color:#7e7d74;cursor:pointer;}.computeritem{cursor:pointer;width:auto;border-radius:5px;background-color:#a6a5a0;height:28px;margin:4px;padding:2px;}.computeritem:hover{background-color:#83827b;}.us{-webkit-touch-callout:initial;-webkit-user-select:auto;-khtml-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;}.rb{cursor:pointer;border:none;float:right;font-size:130%;margin-right:4px;}.fileIcon1{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb49Y2Sj9LT2f///yH5BAEAAAMALAAAAAAQABAAAAImnI+py+1vhJwyUYAzHTL4D3qdlJWaIFJqmKod607sDKIiDUP63hQAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon2{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAM2xV/Xur+XPgP///yH5BAEAAAMALAAAAAAQABAAAAJD3ISZIGHWUGihznesYDYATFVM+D2hJ4lgN1olxALAtAlmPCJvuMmJd6PJckDYwicrHhTD5o7plJmg0Uc0asNMkphHAQA7);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.fileIcon3{background:url(data:image/gif;base64,R0lGODlhEAAQAJEDAPb19IGBgbq6uv///yH5BAEAAAMALAAAAAAQABAAAAIy3ISpxgcPH2ouQgFEw1YmxnUXKEaaEZZnVWZk66JwzKpvuwZzwOgwb/C1gIOA8Yg8DgoAOw==);height:16px;width:16px;cursor:pointer;border:none;float:left;margin-top:1px;}.filelist{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;cursor:default;-khtml-user-drag:element;background-color:white;clear:both;}.fsize{float:right;text-align:right;width:180px;}</style><body onunload="cleanup()"><div id=0 class=header><table id=1 cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td id=2 class=style6><div>&nbsp;<input type=button class=connectbutton id=xconnectbutton1 value=Connect onclick="connectButtonfunction(event, false)" onkeypress="return false" onkeydown="return false">&nbsp;<span id=constatus></span></div></table><div class=progressbar><div id=3 style=height:2px;width:0%;background-color:red></div></div></div><div id=4 class=fullcell style=text-align:center;padding-top:100px;font-size:20px><span id=5>Disconnected</span></div><div id=6 style=height:100%;display:none><div id=7 class=navbar><br><p id=go1 class=nav1 onclick=go(1)><a>System Status</a><p id=go14 class=nav1 onclick=go(14)><a>Remote Desktop</a><p id=go24 class=nav1 onclick=go(24)>&nbsp;&nbsp;<a>Files</a><p id=go13 class=nav1 onclick=go(13)><a>Serial-over-LAN</a><p id=go2 class=nav1 onclick=go(2)><a>Hardware Information</a><p id=go6 class=nav1 onclick=go(6)><a>Event Log</a><p id=go15 class=nav1 onclick=go(15)><a>Audit Log</a><p id=go21 class=nav1 onclick=go(21)><a>Storage</a><p id=go8 class=nav1 onclick=go(8)><a>Network Settings</a><p id=go17 class=nav1 onclick=go(17)><a>Internet Settings</a><p id=go16 class=nav1 onclick=go(16)><a>Security Settings</a><p id=go19 class=nav1 onclick=go(19)><a>Agent Presence</a><p id=go18 class=nav1 onclick=go(18)><a>System Defense</a><p id=go11 class=nav1 onclick=go(11)><a>User Accounts</a><p id=go22 class=nav1 onclick=go(22)><a>Subscriptions</a><p id=go23 class=nav1 onclick=go(23)><a>Wake Alarms</a><p id=go12 class=nav1 onclick=go(12)><a>WSMAN Browser</a></div><div id=8 class=maincell><div id=9 style=position:relative;height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none;z-index:1000><div style=float:right><input id=IDERDiskMapButton type=button value="Disk Map" onclick=iderToggleDiskMap()><input type=button value="Stop IDE-R Session" onclick=iderStop()></div><div style=font-size:16px;padding-top:2px>&nbsp;<span id=10></span></div><div id=iderHeatmap style="z-index:1000;position:absolute;top:31px;right:8px;border:1px solid black;box-shadow:0px 0px 10px;border-radius:5px;padding:8px;width:600px;background-color:#99CC99;display:none"><div id=floppyHeatMap style=display:none><div id=floppyHeatMapText style=margin:2px>Floppy, blocks are 512 bytes.</div><canvas id=floppyHeatMapCanvas width=600 height=0></canvas></div><div id=cdromHeatMap style=display:none><div id=cdromHeatMapText style=margin:2px>CDROM, blocks are 2048 bytes.</div><canvas id=cdromHeatMapCanvas width=600 height=0></canvas></div></div></div><div id=11 style=height:21px;background:#8fac8d;padding:5px;margin-bottom:1px;display:none><div style=font-size:16px;float:right;cursor:pointer;padding-right:5px;padding-left:5px;padding-top:2px;font-size:15px onclick="QV(11, false)">&#x2716;</div><div style=font-size:14px;padding-top:2px>&nbsp;<b>This computer's firmware should be updated,&nbsp;<a style=cursor:pointer href="https://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00075&languageid=en-fr" rel="noreferrer noopener" target="_blank"><u>please check here</u></a>.</b></div></div><div id=12 style=width:100%;height:100%><iframe id=13 style=width:100%;height:100%;border:0></iframe></div><div id=14 style=padding:8px;overflow-x:hidden><div id=p0><h1>Loading...</h1></div><div id=p1 style=display:none><h1>System Status</h1><span id=15></span></div><div id=p2 style=display:none><h1 style=margin-bottom:16px>Hardware Information</h1><span id=16></span></div><div id=p6 style=display:none><h1>Event Log</h1><span id=17></span><span id=18></span></div><div id=p8 style=display:none><h1>Network Settings</h1><span id=19></span><span id=20></span></div><div id=p11 style=display:none><h1>User Accounts</h1><span id=21></span></div><div id=p12 style=display:none><h1>WSMAN Browser</h1><div><table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td><div style=padding:4px><select id=22 multiple="multiple" style=width:100%;height:120px></select></div><tr><td><input id=23 type=button value=Query style=margin:4px onclick=wsmanQuery()><input type=button value=Clear style=margin:4px onclick="QH(24, '')"><input id=c0 placeholder=Filter style=margin:4px onkeyup=wsmanFilter()></table></div><br><div class=us id=24></div></div><div id=p13 style=display:none;min-width:780px><h1>Serial-over-LAN Terminal</h1><br><div id=25 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or Serial-over-LAN feature is disabled<span id=26>, click here to enable it.</span></div></div><div id=27 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input onkeyup=sendTermInputKeys(event) autocorrect=off autocapitalize=off style=opacity:0;width:0;height:0;font-size:1px onblur="keyInputBlur()"><span id=28></span>&nbsp;<div id=termRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px><input type=button id=c1 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c2 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input id=c3 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value="Start Capture" title="Toggle start/stop of terminal capture, when stopping the content of the capture buffer will be saved to a file." onclick=terminalCaptureToggle(event) style=margin-right:3px></div><div>&nbsp;<input type=button id=c4 value=Connect onclick=connectTerminal(event) disabled="disabled">&nbsp;<span id=29>Disconnected.</span></div><tr><td style=background:#000;text-align:center><pre id=Term></pre><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><input id=30 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value=CR+LF title="Toggle what the return key will send" onclick="termToggleCr();Q(30).blur()"><input id=31 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event); return false" class=bottombutton value=80x25 title="Toggle terminal size" onclick="termToggleSize();Q(31).blur()"><input id=32 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Intel (F10 = ESC+[OM)" title="Toggle F1 to F10 keys emulation type" onclick="termToggleFx();Q(32).blur()"><input id=33 type=button onkeypress="return false" onkeydown="if (event.keyCode == 13) handleKeyPress(event);return false" class=bottombutton value="Extended Ascii" title="Toggle terminal emulation type" onclick="termToggleType();Q(33).blur()">&nbsp;</div><div><span id=termkeysspan><select style=margin-left:6px id=termkeys><option value=3>Ctrl-C<option value=24>Ctrl-X<option value=27>ESC<option value=8>Backspace<option value=1001>F1<option value=1002>F2<option value=1003>F3<option value=1004>F4<option value=1005>F5<option value=1006>F6<option value=1007>F7<option value=1008>F8<option value=1009>F9<option value=1010>F10<option value=1011>F11<option value=1012>F12</select><input id=TermWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=termSendKeys()>&nbsp;</span><input id=34 type=button onkeypress="return false" onkeydown="return false" class=cadbutton value=Paste disabled="disabled" onclick="setDialogMode(3,'Paste',3,termPaste)"></div></table></div><div id=p14 style=display:none;min-width:780px><div id=35><h1>Remote Desktop</h1><br></div><div id=36 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showFeaturesDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Intel&reg; AMT Redirection port or KVM feature is disabled<span id=37>, click here to enable it.</span></div></div><div id=38 style=max-width:100%;display:none;cursor:pointer;margin-bottom:5px onclick=showPowerActionDlg()><div class=icon2 style=float:left;margin:7px></div><div style=width:auto;border-radius:8px;padding:8px;background-color:lightsalmon>Remote computer is not powered on, click here to issue a power command.</div></div><table cellpadding=0 cellspacing=0 style=width:100%;padding:0px;padding:0px;margin-top:0px><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div style=float:right;text-align:right><span id=39></span>&nbsp;<div class=rb title="Rotate Left" onclick=drotate(-1)>&olarr;</div><div class=rb title="Rotate Right" onclick=drotate(1)>&orarr;</div><div id=deskRecordIcon title="Server is recording this session" style=display:none;float:right;background-color:red;width:12px;height:12px;border-radius:6px;margin-top:5px;margin-right:4px></div><input id=c5 type=button title="Toggle full screen mode" onkeypress="return false" onkeydown="return false" value=Full onclick=deskToggleFull() style=margin-right:3px><input id=c6 type=button title="Save a screenshot of the remote desktop" onkeypress="return false" onkeydown="return false" value=Save... onclick=deskSaveImage() style=margin-right:3px><input type=button value=Settings... title="Edit remote desktop settings" onkeypress="return false" onkeydown="return false" onclick=showDesktopSettings() style=margin-right:3px><input type=button id=c7 value=SIDER title="Start server-side remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderServerStart() style=margin-right:3px><input type=button id=c8 value=IDER title="Start remote disk mount operation" onkeypress="return false" onkeydown="return false" onclick=iderStart(event) style=margin-right:3px><input type=button title="Change the power state of the remote machine" onkeypress="return false" onkeydown="return false" value="Power Actions..." onclick=showPowerActionDlg() style=margin-right:3px></div><div><div id=c9 onclick=deskToggleFull() style=float:left;cursor:pointer;font-size:15px;display:none>&nbsp;&#x2716;</div>&nbsp;<input type=button id=c10 value=Connect onclick=connectDesktopButton(event) onkeypress="return false" onkeydown="return false" disabled="disabled">&nbsp;<span id=40>Disconnected.</span></div><tr><td id=41 style=background:black;text-align:center;position:relative><canvas id=Desk width=640 height=400 style=-ms-touch-action:none;margin-left:0px oncontextmenu="return false" onmousedown=dmousedown(event) onmouseup=dmouseup(event) onmousemove=dmousemove(event) onwheel="dmousewheel(event)" moz-opaque=""></canvas><tr><td style=padding-top:2px;padding-bottom:2px;background:#CCC><div id=42 style=float:right></div><div>&nbsp;<span id=deskkeysspan><select style=margin-left:6px id=deskkeys><option value=0>Win<option value=1>Win+Down<option value=2>Win+Up<option value=3>Win+L<option value=4>Win+M<option value=20>Win+R<option value=23>Win+Left<option value=24>Win+Right<option value=5>Shift+Win+M<option value=19>Alt-Tab<option value=21>Alt-F4<option value=22>Ctrl-W<option value=6>F1<option value=7>F2<option value=8>F3<option value=9>F4<option value=10>F5<option value=11>F6<option value=12>F7<option value=13>F8<option value=14>F9<option value=15>F10<option value=16>F11<option value=17>F12</select><input id=DeskWD type=button value=Send onkeypress="return false" onkeydown="return false" onclick=deskSendKeys()>&nbsp;</span><input id=43 type=button value=Ctrl-Alt-Del onkeypress="return false" onkeydown="return false" onclick=sendCAD()>&nbsp;<input id=44 type=button value=Type onkeypress="return false" onkeydown="return false" onclick=deskShowTypeDialog()>&nbsp;<span id=45><input id=46 type=checkbox>Blank Screen&nbsp;</span><span id=47><input id=48 type=checkbox>View only&nbsp;</span></div></table></div><div id=p15 style=display:none><span id=49></span><h1>Audit Log</h1><span id=50></span></div><div id=p16 style=display:none><h1>Security Settings</h1><span id=51></span></div><div id=p17 style=display:none><h1>Internet Settings</h1><span id=52></span></div><div id=p18 style=display:none><h1>System Defense</h1><span id=53></span></div><div id=p19 style=display:none><h1>Agent Presence</h1><span id=54></span></div><div id=p21 style=display:none><h1>Storage</h1><span id=55></span></div><div id=p22 style=display:none><h1>Event Subscriptions</h1><span id=56></span></div><div id=p23 style=display:none><h1>Wake Alarms</h1><span id=57></span></div><div id=p24 style=display:none;position:absolute;top:0px;bottom:0px;left:8px;right:24px><h1>Files</h1><br><table id=p24toolbar style=width:100%;position:absolute;top:35px cellpadding=0 cellspacing=0><tr><td style=width:100%;background-color:#d3d9d6;text-align:left;padding:4px valign="bottom"><div id=p24rightOfButtons style=float:right;margin-top:3px></div><div><input type=button id=p24FolderUp disabled="disabled" onclick=p24folderup() value=Up>&nbsp;<input type=button id=p24SelectAllButton disabled="disabled" onclick=p24selectallfile() value="Select All" onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RenameFileButton disabled="disabled" value=Rename onclick=p24renamefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24DeleteFileButton disabled="disabled" value=Delete onclick=p24deletefile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24NewFolderButton disabled="disabled" value="New Folder" onclick=p24createfolder() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24UploadButton disabled="disabled" value=Upload onclick=p24uploadFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CutButton disabled="disabled" value=Cut onclick=p24copyFile(1) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24CopyButton disabled="disabled" value=Copy onclick=p24copyFile(0) onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24PasteButton disabled="disabled" value=Paste onclick=p24pasteFile() onkeypress="return false" onkeydown="return false">&nbsp;<input type=button id=p24RefreshButton disabled="disabled" value=Refresh onclick=p24folderup(9999) onkeypress="return false" onkeydown="return false">&nbsp;</div><tr><td style=background-color:#E4E9E7;height:28px><div style=float:right;margin-right:4px><select id=p24sortdropdown onchange=p24updateFiles()><option value=1 selected="selected">Sort by name<option value=2>Sort by size<option value=3>Sort by date<option value=4>Descend by name<option value=5>Descend by size<option value=6>Descend by date</select></div><div>&nbsp;&nbsp;<span id=p24currentpath></span></div></table><div id=p24filetable style=width:100%;overflow:auto;-webkit-user-select:none;position:absolute;top:92px;bottom:30px><div id=p24bigok style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&checkmark;</b></div><div id=p24bigfail style=width:256px;overflow:hidden;position:absolute;top:80px;width:100%;text-align:center;font-size:1600%;color:#AAAAAA;display:none><b>&#10007;</b></div><span id=p24files></span></div><table id=p24toolbarBottom style=width:100%;position:absolute;bottom:10px cellpadding=0 cellspacing=0><tr><td style=text-align:left;padding:3px;text-align:center;background-color:#D3D9D6>&nbsp;<span id=p24bottomstatus></span></table></div></div></div></div><div id=dialog style="z-index:1000;background-color:#EEE;box-shadow:0px 0px 15px #666;font-family:Arial, Helvetica, sans-serif;border-radius:5px;position:fixed;overflow:hidden;top:75px;width:400px;max-height:550px;display:none"><div style="width:100%;background-color:#003366;color:#FFF;border-radius:5px 5px 0 0"><div id=58 style=float:right;padding:1px;margin-right:5px;cursor:pointer;font-size:15px onclick=setDialogMode()>&#x2716;</div><div id=59 style=padding:5px></div><div style=width:100%;margin:6px></div></div><div style=margin-right:16px;margin-left:8px><div id=dialog1 style=margin:auto;text-align:center;margin:3px><div id=60 style=padding:10px></div></div><div id=dialog2 style=margin:auto;margin:3px><br><div style=height:26px><input id=d2username style=float:right;width:200px onkeyup=updateAccountDialog()><div>Username</div></div><div style=height:26px><input id=d2password1 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Password*</div></div><div style=height:26px><input id=d2password2 type=password autocomplete="off" style=float:right;width:200px onkeyup=updateAccountDialog()><div>Confirm Password</div></div><div id=61><div style=height:26px><select id=d2permission style=float:right;width:200px><option value=0>Local<option value=1>Network<option value=2>Any</select><div>Permission</div></div><div>Granted Permissions</div><ul id=62 style="list-style-type:none;height:100px;overflow:auto;width:100%;border:1px solid #000;background-color:white;overflow-x:hidden;margin:0;padding:0"></ul></div><div style=font-size:10px><br>*Minimum 8 characters with upper, lowercase, 0-9, and one of !@#$%^&amp;*()+-</div></div><div id=dialog3 style=margin:auto;text-align:center;margin:3px><textarea id=d3pastetextarea maxlength="4096" style=width:100%;height:200px;resize:none></textarea></div><div id=dialog5 style=margin:auto;margin:3px><br><div style=height:26px><select id=d5actionSelect style=float:right;width:200px></select><div>Power Action</div></div><div><span style=color:red>Warning:</span>Some power actions may result in data loss and may disconnect the desktop, terminal or disk redirection sessions.</div></div><div id=dialog6 style=margin:auto;margin:3px><br><div style=height:26px><input id=d6ConsentText style=float:right;width:200px maxlength="6" onkeyup=consentChanged() onkeypress="if (event.keyCode == 13) return dialogclose(1); else return numbersOnly(event)"><div>Consent Code</div></div><div style=height:26px><select id=d6Display onchange=changeConsentDisplay() style=float:right;width:200px><option value=0>Primary display<option value=1>Secondary display<option id=d6ThirdDisplay value=2 style=display:none>Third display</select><div>Consent Display</div></div></div><div id=dialog7 style=margin:auto;margin:3px><br><div style=height:26px><select id=c11 style=float:right;width:200px></select><div>Image Encoding</div></div><div id=d7decimationspan style=height:26px><select id=d7decimation style=float:right;width:200px><option value=0>Don't set<option value=1>Disabled<option value=2>Automatic<option value=3>Enabled</select><div>Downscaling</div></div><div style=height:80px><div style="float:right;border:1px solid #666;width:200px;height:80px;overflow-y:scroll;background-color:white"><label><input type=checkbox id=d7showcursor>Show Local Mouse Cursor</label><br><label><input type=checkbox id=d7showcad>Show Ctrl-Alt-Del</label><br><label><input type=checkbox id=d7limitFrameRate>Limit Frame Rate</label><br><label><input type=checkbox id=d7noMouseRotate>Don't Rotate Mouse</label><br></div><div>Other Settings</div></div><div id=d7softkvmsettings style=display:none><h4 style="width:100%;border-bottom:1px solid gray">Software KVM</h4><div style="margin:3px 0 3px 0"><select id=d7bitmapquality style=float:right;width:200px;height:20px dir="rtl"><option value=50>50%<option value=40>40%<option selected="selected" value=30>30%<option value=20>20%<option value=10>10%<option value=5>5%<option value=1>1%</select><div style=height:20px>Quality</div></div><div style="margin:3px 0 3px 0"><select id=d7bitmapscaling style=float:right;width:200px;height:20px dir="rtl"><option selected="selected" value=1024>100%<option value=896>87.5%<option value=768>75%<option value=640>62.5%<option value=512>50%<option value=384>37.5%<option value=256>25%<option value=128>12.5%</select><div style=height:20px>Scaling</div></div></div></div><div id=dialog8 style=display:table;margin:3px><div style="margin:3px 0 3px 0;padding-top:5px"><input id=c12 value=admin style=float:right;width:220px><div style=height:20px>Username</div></div><div style="margin:3px 0 3px 0"><input id=c13 type=password autocomplete="off" style=float:right;width:220px><div style=height:20px>Password</div></div></div><div id=dialog9 style=margin:auto;margin:3px><label style=display:block><input type=checkbox id=c14>Redirection Port</label><label id=c15 style=display:block><input type=checkbox id=c16>KVM Remote Desktop</label><label style=display:block><input type=checkbox id=c17>IDE-Redirection<br></label><label style=display:block><input type=checkbox id=c18>Serial-over-LAN<br></label></div><div id=dialog10 style=margin:auto;margin:3px><label><input type=radio name=d10 id=c19 value=0>Not Required<br></label><label><input type=radio name=d10 id=c20 value=1>Required for KVM only<br></label><label><input type=radio name=d10 id=c21 value=4294967295>Always Required<br></label></div><div id=dialog11 style=margin:auto;margin:3px><div id=63></div></div><div id=dialog12 style=margin:auto;margin:3px><br><div style=height:26px><input id=c22 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">Profile Name</div></div><div style=height:26px><input id=c23 style=float:right;width:200px maxlength="32" onkeyup=updateWifiDialog() title="Maximum 32 characters"><div title="Maximum 32 characters">SSID</div></div><div style=height:26px><select id=c24 style=float:right;width:200px onclick=updateWifiDialog()></select><div>Priority</div></div><div style=height:26px><select id=c25 style=float:right;width:200px onclick=updateWifiDialog()><option id=c26 value=32768>WPA3 SAE<option value=6>WPA2 PSK<option value=4>WPA PSK</select><div>Authentication</div></div><div style=height:26px><select id=c27 style=float:right;width:200px onclick=updateWifiDialog()><option id=64 value=4>CCMP-AES<option id=65 value=3>TKIP-RC4<option id=66 value=2>WEP<option id=67 value=5>None</select><div>Encryption</div></div><div style=height:26px><input id=c28 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Password*</div></div><div style=height:26px><input id=c29 type=password style=float:right;width:200px maxlength="63" onkeyup=updateWifiDialog() title="Length between 8 and 63 characters"><div title="Length between 8 and 63 characters">Confirm Password</div></div></div><div id=dialog19 style=margin:auto;margin:3px>This will save the entire state of Intel&reg; AMT for this machine into file. Passwords will not be saved, but some sensitive data may be included.<br><br><input id=c30 style=width:100% value=amtstate.json></div><div id=dialog20 style=margin:auto;margin:3px><input type=radio name=d20 id=d20a value=0>Disabled<br><input type=radio name=d20 id=d20b value=1>ICMP response<br><input type=radio name=d20 id=d20c value=2>RMCP response<br><input type=radio name=d20 id=d20d value=3>ICMP & RMCP response<br><br></div><div id=dialog21 style=margin:auto;margin:3px><div id=68><label><input type=checkbox name=d21 id=d21ipsync onclick=updateIPSetupDlg()>Operating system IP address sync</label><br></div><label><input type=radio name=d21 id=d21o0 onclick=updateIPSetupDlg()><span id=d21l0></span></label><br><label><input type=radio name=d21 id=d21o1 onclick=updateIPSetupDlg()><span id=d21l1></span></label><br><div id=69><label><input type=radio name=d21 id=d21o2 onclick=updateIPSetupDlg()><span id=d21l2></span></label><br><br><div style=margin-left:20px><div style=height:26px><input id=c31 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>IP address</div></div><div style=height:26px id=70><input id=c32 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Subnet mark</div></div><div style=height:26px><input id=c33 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Gateway</div></div><div style=height:26px><input id=c34 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Primary DNS</div></div><div style=height:26px><input id=c35 onkeyup=updateIPSetupDlg() style=float:right;width:230px><div>Alternate DNS</div></div></div></div></div><div id=dialog23 style=margin:auto;margin:3px><br><div style=height:26px><select id=c36 style=float:right;width:200px onchange=showEditDnsDlgChange()><option value=0>Disabled<option value=1>Disabled, DHCP update<option value=2>Enabled</select><div>Dynamic DNS client</div></div><div style=height:26px><input id=c37 style=float:right;width:200px><div>Update Interval (minutes)</div></div><div style=height:26px><input id=c38 style=float:right;width:200px><div>TTL (seconds)</div></div><div style=font-size:10px><br>Defaut Interval is 1440 minutes, Default TTL is 900 seconds.</div></div><div id=dialog24 style=margin:auto;margin:3px><br><div style=height:26px><select id=c39 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=2>Power up<option value=10>Reset<option value=5>Power cycle<option value=8>Power down<option id=d24p500 value=500>OS Wake from Standby<option id=d24p501 value=501>OS Power Saving<option value=999>Set boot options</select><div>Remote Command</div></div><div style=height:80px><div id=c40 style="float:right;border:1px solid #666;width:200px;height:72px;overflow-y:scroll;background-color:white"><div id=d24dBiosPause><label><input type=checkbox id=d24BiosPause onchange=showAdvPowerDlgChange()>BIOS Pause</label><br></div><div id=d24dBiosSecureBoot><label><input type=checkbox id=d24BiosSecureBoot onchange=showAdvPowerDlgChange()>Enforce Secure Boot</label><br></div><div id=d24dBiosSetup><label><input type=checkbox id=d24BiosSetup onchange=showAdvPowerDlgChange()>BIOS Setup</label><br></div><div id=d24dForceProgressEvents><label><input type=checkbox id=d24ForceProgressEvents onchange=showAdvPowerDlgChange()>Force progress events</label><br></div><div id=d24dLockPowerButton><label><input type=checkbox id=d24LockPowerButton onchange=showAdvPowerDlgChange()>Lock power button</label><br></div><div id=d24dLockResetButton><label><input type=checkbox id=d24LockResetButton onchange=showAdvPowerDlgChange()>Lock reset button</label><br></div><div id=d24dLockSleepButton><label><input type=checkbox id=d24LockSleepButton onchange=showAdvPowerDlgChange()>Lock sleep button</label><br></div><div id=d24dLockKeyboard><label><input type=checkbox id=d24LockKeyboard onchange=showAdvPowerDlgChange()>Lock keyboard</label><br></div><div id=d24dUserPasswordBypass><label><input type=checkbox id=d24UserPasswordBypass onchange=showAdvPowerDlgChange()>BIOS password bypass</label><br></div><div id=d24dReflashBios><label><input type=checkbox id=d24ReflashBios onchange=showAdvPowerDlgChange()>Reflash BIOS</label><br></div><div id=d24dSafeMode><label><input type=checkbox id=d24SafeMode onchange=showAdvPowerDlgChange()>Safe mode</label><br></div><div id=d24dUseIDER><label><input type=checkbox id=d24UseIDER onchange=showAdvPowerDlgChange()>Use IDER</label><br></div><div id=d24dSerialOverLan><label><input type=checkbox id=d24SerialOverLan onchange=showAdvPowerDlgChange()>Serial-over-LAN</label><br></div><div id=d24dSecureErase><label><input type=checkbox id=d24SecureErase onchange=showAdvPowerDlgChange()>Intel&reg; Remote Secure Erase</label><br></div><div id=d24dPlatformErase><label><input type=checkbox id=d24PlatformErase onchange=showAdvPowerDlgChange()>Remote Platform Erase</label><br></div><div id=d24dFirmwareReset><label><input type=checkbox id=d24FirmwareReset onchange=showAdvPowerDlgChange()>Clear Intel&reg; ME Settings</label><br></div></div><div>Boot Settings</div></div><div style=height:26px><select id=c41 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option id=ForceDVDBootOption value=1>Force CD/DVD Boot<option id=ForcePXEBootOption value=2>Force PXE Boot<option id=ForceHDBootOption value=3>Force Hard Disk Boot<option id=ForceDiagBootOption value=4>Force Diagnostic Boot</select><div>Boot Source</div></div><div id=c42 style=height:26px><select id=c43 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>None<option value=1>Index 1<option value=2>Index 2<option value=3>Index 3<option value=3>Index 4</select><div>Boot Media</div></div><div style=height:26px id=idd_d24IDERBootDevice><select id=c44 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>Boot to floppy<option value=1>Boot to CDROM</select><div>IDER Boot Device</div></div><div style=height:26px><select id=c45 style=float:right;width:200px onchange=showAdvPowerDlgChange()><option value=0>System Default<option id=c46 value=1>Quiet<option id=c47 value=2>Verbose<option id=c48 value=3>Blank Screen</select><div>Verbocity</div></div><div style=height:26px id=idd_d24RSEPass><div style=float:right;width:200px><input type=password id=d24rsepass maxlength="32" style=float:right;width:100%></div><div>RSE Password</div></div></div><div id=dialog25 style=margin:auto;margin:3px><div style=text-align:left><div style=height:26px;margin-top:4px><input id=d25alarm_name style=float:right;width:180px maxlength="32" onkeyup=alertDialogUpdate()><div style=padding-top:4px>Alarm name</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_sdate style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Wake date (year-month-day)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_stime style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,58)"></div><div style=padding-top:4px>Wake time (hour:min:sec)</div></div><div style=height:26px;margin-top:4px><div style=float:right><input id=d25alarm_interval style=width:180px maxlength="10" onkeyup=alertDialogUpdate() onkeypress="return numbersOnly(event,45)"></div><div style=padding-top:4px>Interval (days-hours-min)</div></div><div style=height:26px;margin-top:4px><div style=float:right;width:180px><select id=d25alarm_doc style=width:100% onchange=showAdvPowerDlgChange()><option value=0>Keep alarm<option value=1>Delete on completion</select></div><div style=padding-top:4px>After wake</div></div></div></div><div id=dialog26 style=margin:auto;margin:3px><div id=d26rpediv><div>Remote Platform Erase (RPE)</div><label><input type=radio name=d26b id=c49 value=2>Enabled<br></label><label><input type=radio name=d26b id=c50 value=0>Disabled<br></label><hr></div><div>One One Click Recovery (OCR)</div><label><input type=radio name=d26a id=c51 value=1>Enabled<br></label><label><input type=radio name=d26a id=c52 value=0>Disabled<br></label></div></div><div style=padding:10px;margin-bottom:4px><input id=c53 type=button value=Cancel style=float:right;width:80px;margin-left:5px onclick=dialogclose(0)><input id=c54 type=button value=OK style=float:right;width:80px onclick=dialogclose(1)><div style=height:25px><input id=c55 type=button value=Delete style=width:80px;display:none onclick=dialogclose(2)></div></div></div><script>var $jscomp={scope:{},getGlobal:function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global?global:b}};$jscomp.global=$jscomp.getGlobal(this);$jscomp.initSymbol=function(){$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol);$jscomp.initSymbol=function(){}};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(b){return"jscomp_symbol_"+b+$jscomp.symbolCounter_++};
2 $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();$jscomp.global.Symbol.iterator||($jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));$jscomp.initSymbolIterator=function(){}};
3 $jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();if(b[$jscomp.global.Symbol.iterator])return b[$jscomp.global.Symbol.iterator]();if(!(b instanceof Array||"string"==typeof b||b instanceof String))throw new TypeError(b+" is not iterable");var c=0;return{next:function(){return c==b.length?{done:!0}:{done:!1,value:b[c++]}}}};$jscomp.arrayFromIterator=function(b){for(var c,a=[];!(c=b.next()).done;)a.push(c.value);return a};
4 $jscomp.arrayFromIterable=function(b){return b instanceof Array?b:$jscomp.arrayFromIterator($jscomp.makeIterator(b))};$jscomp.arrayFromArguments=function(b){for(var c=[],a=0;a<b.length;a++)c.push(b[a]);return c};
@@ -12,173 +12,174 @@ function ObjectToStringEx2(b,c){var a="";if(0!=b&&(!b||null==b))return"(Null)";i
12 function ObjectToString2(b){return ObjectToStringEx2(b,0)}function hex2rstr(b){if("string"!=typeof b||0==b.length)return"";var c="";b=(""+b).match(/../g);for(var a;a=b.shift();)c+=String.fromCharCode("0x"+a);return c}function char2hex(b){return(b+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(b){var c="",a;for(a=0;a<b.length;a++)c+=char2hex(b.charCodeAt(a));return c}function encode_utf8(b){return unescape(encodeURIComponent(b))}
13 function decode_utf8(b){return decodeURIComponent(escape(b))}function data2blob(b){for(var c=Array(b.length),a=0;a<b.length;a++)c[a]=b.charCodeAt(a);return new Blob([new Uint8Array(c)])}function random(b){return Math.floor(Math.random()*b)}function trademarks(b){return b.replace(/\(R\)/g,"&reg;").replace(/\(TM\)/g,"&trade;")}function format(b){var c=Array.prototype.slice.call(arguments,1);return b.replace(/{(\d+)}/g,function(a,b){return"undefined"!=typeof c[b]?c[b]:a})}
14 function makeUefiBootParam(b,c,a){"number"==typeof c&&(1==a&&(c=String.fromCharCode(c&255)),2==a&&(c=ShortToStrX(c)),4==a&&(c=IntToStrX(c)));return ShortToStrX(32902)+ShortToStrX(b)+IntToStrX(c.length)+c}
15 -var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,C,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 -0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,C);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 -d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),C&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 -2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),C&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 -e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),C&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 -c,H,d);a(c,H,d,C);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 -C&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),C&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),C&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=g;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 -P||J&&30>P)r+=D;if(256==P||J&&256>P)r+=y;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,C&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),C&1);break;case 76:e.SendCommand(81,
23 -IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),C&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 -switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:x;break;case 5:160==c&&(r=2880>=H?p:n);break;case 63:r=160==c?2880>=H?q:l:E;break;case 26:176==c&&(r=h);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,C&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,y,c){var h=null,x=0;160==a&&(h=e.floppy,null!=e.floppy&&(x=e.floppy.size>>9));176==
25 -a&&(h=e.cdrom,null!=e.cdrom&&(x=e.cdrom.size>>11));if(0>y||b+y>x)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==y)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=h&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,x,b,y),160==a?(b<<=9,y<<=9):(b<<=11,y<<=11),null!==J?C.push({media:h,dev:a,lba:b,len:y,fr:c}):(J=h,P=a,r=b,N=y,d(c)))}function d(a){var b=N,y=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 -b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),C=[],H=!1):0<C.length&&(b=C.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(y,y+b)):c.readAsArrayBuffer(J.slice(y,y+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 -sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,
28 -36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),q=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),h=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 -24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),E=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),g=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),D=String.fromCharCode(0,30,3,0),y=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 -5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),x=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;C=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
15 +var CreateAmtRemoteIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log(arguments)}function c(c,d,E,H){switch(d.charCodeAt(0)){case 0:b("SCSI: TEST_UNIT_READY",c);switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.floppyReady)return e.floppyReady=!0,e.SendCommandEndResponse(1,6,c,40,0),-1;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;if(0==e.cdromReady)return e.cdromReady=!0,e.SendCommandEndResponse(1,6,c,40,
16 +0),-1;break;default:return b("SCSI Internal error 3",c),-1}e.SendCommandEndResponse(1,0,c,0,0);break;case 8:H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3);d=d.charCodeAt(4);0==d&&(d=256);b("SCSI: READ_6",c,H,d);a(c,H,d,E);break;case 10:return H=((d.charCodeAt(1)&31)<<16)+(d.charCodeAt(2)<<8)+d.charCodeAt(3),d=d.charCodeAt(4),0==d&&(d=256),b("SCSI: WRITE_6",c,H,d),e.SendCommandEndResponse(1,2,c,58,0),-1;case 26:b("SCSI: MODE_SENSE_6",c);if(63==d.charCodeAt(2)&&0==d.charCodeAt(3)){H=
17 +d=0;switch(c){case 160:if(null==e.floppy)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=0;H=128;break;case 176:if(null==e.cdrom)return e.SendCommandEndResponse(1,2,c,58,0),-1;d=5;H=128;break;default:return b("SCSI Internal error 6",c),-1}e.SendDataToHost(c,!0,String.fromCharCode(0,d,H,0),E&1);return}e.SendCommandEndResponse(1,5,c,36,0);break;case 27:e.SendCommandEndResponse(1,0,c);break;case 30:b("SCSI: ALLOW_MEDIUM_REMOVAL",c);if(160==c&&null==e.floppy||176==c&&null==e.cdrom)return e.SendCommandEndResponse(1,
18 +2,c,58,0),-1;e.SendCommandEndResponse(1,0,c,0,0);break;case 35:b("SCSI: READ_FORMAT_CAPACITIES",c);H=ReadShort(d,7);switch(c){case 160:if(null==e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,5,c,36,0),-1;break;default:return b("SCSI Internal error 4",c),-1}e.SendDataToHost(c,!0,IntToStr(8)+String.fromCharCode(0,0,11,64,2,0,2,0),E&1);break;case 37:b("SCSI: READ_CAPACITY",c);d=0;switch(c){case 160:if(null==
19 +e.floppy||0==e.floppy.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.floppy&&(d=(e.floppy.size>>9)-1);b("DEV_FLOPPY",d);break;case 176:if(null==e.cdrom||0==e.cdrom.size)return e.SendCommandEndResponse(0,2,c,58,0),-1;null!=e.cdrom&&(d=(e.cdrom.size>>11)-1);b("DEV_CDDVD",d);break;default:return b("SCSI Internal error 4",c),-1}b("SCSI: READ_CAPACITY2",c,H);e.SendDataToHost(H,!0,IntToStr(d)+String.fromCharCode(0,0,176==c?8:2,0),E&1);break;case 40:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: READ_10",
20 +c,H,d);a(c,H,d,E);break;case 42:case 46:H=ReadInt(d,2);d=ReadShort(d,7);b("SCSI: WRITE_10",c,H,d);e.SendGetDataFromHost(c,512*d);break;case 67:H=ReadShort(d,7);var r=d.charCodeAt(1)&2,J=d.charCodeAt(2)&7;0==J&&(J=d.charCodeAt(9)>>6);b("SCSI: READ_TOC, dev="+c+", buflen="+H+", msf="+r+", format="+J);switch(c){case 160:return e.SendCommandEndResponse(1,5,c,32,0),-1;case 176:break;default:return b("SCSI Internal error 9",c),-1}1==J?e.SendDataToHost(c,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),
21 +E&1):0==J&&(r?e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),E&1):e.SendDataToHost(c,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),E&1));break;case 70:var J=2!=d.charCodeAt(1),P=ReadShort(d,2);H=ReadShort(d,7);b("SCSI: GET_CONFIGURATION",c,J,P,H);if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;r=IntToStr(8);0==P&&(r+=m);if(1==P||J&&1>P)r+=k;if(2==P||J&&2>P)r+=h;if(3==P||J&&3>P)r+=u;if(16==P||J&&16>P)r+=O;if(30==
22 +P||J&&30>P)r+=C;if(256==P||J&&256>P)r+=x;if(261==P||J&&261>P)r+=z;r=IntToStr(r.length)+r;r.length>H&&(r=r.substring(0,H));e.SendDataToHost(c,!0,r,E&1);return-1;case 74:b("SCSI: GET_EVENT_STATUS_NOTIFICATION",c,d.charCodeAt(1),d.charCodeAt(4),d.charCodeAt(9));if(1!=d.charCodeAt(1)&&16!=d.charCodeAt(4)){b("SCSI ERROR");e.SendCommandEndResponse(1,5,c,38,1);break}d=0;160==c&&null!=e.floppy?d=2:176==c&&null!=e.cdrom&&(d=2);e.SendDataToHost(c,!0,String.fromCharCode(0,d,128,0),E&1);break;case 76:e.SendCommand(81,
23 +IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return b("SCSI READ_DISC_INFO",c),e.SendCommandEndResponse(0,5,c,32,0),-1;case 85:return b("SCSI ERROR: MODE_SELECT_10",c),e.SendCommandEndResponse(1,5,c,32,0),-1;case 90:b("SCSI: MODE_SENSE_10",c,d.charCodeAt(2)&63);H=ReadShort(d,7);r=null;if(0==H)return e.SendDataToHost(c,!0,IntToStr(60)+IntToStr(8),E&1),-1;H=0;160==c?null!=e.floppy&&(H=e.floppy.size>>9):null!=e.cdrom&&(H=e.cdrom.size>>11);
24 +switch(d.charCodeAt(2)&63){case 1:r=160==c?2880>=H?A:R:y;break;case 5:160==c&&(r=2880>=H?q:n);break;case 63:r=160==c?2880>=H?p:l:D;break;case 26:176==c&&(r=g);break;case 29:176==c&&(r=B);break;case 42:176==c&&(r=w)}null==r?e.SendCommandEndResponse(0,5,c,32,0):e.SendDataToHost(c,!0,r,E&1);break;default:return b("IDER: Unknown SCSI command",d.charCodeAt(0)),e.SendCommandEndResponse(0,5,c,32,0),-1}return 0}function a(a,b,x,c){var g=null,A=0;160==a&&(g=e.floppy,null!=e.floppy&&(A=e.floppy.size>>9));176==
25 +a&&(g=e.cdrom,null!=e.cdrom&&(A=e.cdrom.size>>11));if(0>x||b+x>A)return e.SendCommandEndResponse(1,5,a,33,0),0;if(0==x)return e.SendCommandEndResponse(1,0,a,0,0),0;null!=g&&(e.sectorStats&&e.sectorStats(1,160==a?0:1,A,b,x),160==a?(b<<=9,x<<=9):(b<<=11,x<<=11),null!==J?E.push({media:g,dev:a,lba:b,len:x,fr:c}):(J=g,P=a,r=b,N=x,d(c)))}function d(a){var b=N,x=r;N>e.iderinfo.readbfr&&(b=e.iderinfo.readbfr);N-=b;r+=b;var c=new FileReader;c.onload=function(){var b=this.result;"object"==typeof b&&(b=new Uint8Array(b),
26 +b=String.fromCharCode.apply(null,b));e.SendDataToHost(P,0==N,b,a&1);0<N&&0==H?d(a):(J=null,H?(e.SendCommand(71),E=[],H=!1):0<E.length&&(b=E.shift(),J=b.media,P=b.dev,r=b.lba,N=b.len,d(b.fr)))};c.readAsBinaryString?c.readAsBinaryString(J.slice(x,x+b)):c.readAsArrayBuffer(J.slice(x,x+b))}var e={protocol:3,bytesToAmt:0,bytesFromAmt:0,rx_timeout:3E4,tx_timeout:0,heartbeat:2E4,version:1,acc:"",inSequence:0,outSequence:0,iderinfo:null,enabled:!1,iderStart:0,floppy:null,cdrom:null,floppyReady:!1,cdromReady:!1,
27 +sectorStats:null},v=null;urlvars&&urlvars.iderlog&&(v=require("fs").createWriteStream(urlvars.iderlog,{flags:"w"}));var n=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),l=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),q=String.fromCharCode(0,38,
28 +36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),p=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),g=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),B=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),w=String.fromCharCode(0,32,1,128,0,0,0,0,42,
29 +24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),D=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0);String.fromCharCode(0,0,0,40,0,0,0,8);var m=String.fromCharCode(0,0,3,4,0,8,1,0),k=String.fromCharCode(0,1,3,4,0,0,0,2),h=String.fromCharCode(0,2,3,4,0,0,0,0),u=String.fromCharCode(0,3,3,4,41,0,0,2),O=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),C=String.fromCharCode(0,30,3,0),x=String.fromCharCode(1,0,3,0),z=String.fromCharCode(1,
30 +5,3,0),A=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),R=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),y=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);e.xxStateChange=function(a){b("IDER-StateChange",a);0==a&&e.Stop();3==a&&e.Start()};e.Start=function(){b("IDER-Start");b(e.floppy,e.cdrom);e.bytesToAmt=0;e.bytesFromAmt=0;e.inSequence=0;e.outSequence=0;E=[];e.SendCommand(64,ShortToStrX(e.rx_timeout)+ShortToStrX(e.tx_timeout)+ShortToStrX(e.heartbeat)+
31 IntToStrX(e.version));e.sectorStats&&(e.sectorStats(0,0,e.floppy?e.floppy.size>>9:0),e.sectorStats(0,1,e.cdrom?e.cdrom.size>>11:0))};e.Stop=function(){b("IDER-Stop");e.parent.Stop()};e.ProcessData=function(a){e.bytesFromAmt+=a.length;e.acc+=a;null!=v&&v.write("IDERRECV: "+rstr2hex(a)+"\r\n");for(b("IDER-ProcessData",e.acc.length,rstr2hex(e.acc));;){a=e.ProcessDataEx();if(0==a)break;if(e.inSequence!=ReadIntX(e.acc,4)){b("ERROR: Out of sequence",e.inSequence,ReadIntX(e.acc,4));e.Stop();break}e.inSequence++;
32 -e.acc=e.acc.substring(a)}};e.SendCommand=function(a,y,c,h){null==y&&(y="");c=50<a&&1==c?2:0;h&&(c+=1);y=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+y;e.parent.xxSend(y);e.bytesToAmt+=y.length;null!=v&&v.write("IDERSEND: "+rstr2hex(y)+"\r\n");75!=a&&b("IDER-SendData",y.length,rstr2hex(y))};e.SendCommandEndResponse=function(a,b,y,c,h){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,y,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 -135,b<<4,3,0,0,0,y,81,b,c,h),!0)};e.SendDataToHost=function(a,b,y,c){var h=c?0:y.length;1==b?e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+y,b,c):e.SendCommand(84,String.fromCharCode(0,y.length&255,y.length>>8,0,c?180:181,0,2,0,h&255,h>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+y,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
32 +e.acc=e.acc.substring(a)}};e.SendCommand=function(a,x,c,g){null==x&&(x="");c=50<a&&1==c?2:0;g&&(c+=1);x=String.fromCharCode(a,0,0,c)+IntToStrX(e.outSequence++)+x;e.parent.xxSend(x);e.bytesToAmt+=x.length;null!=v&&v.write("IDERSEND: "+rstr2hex(x)+"\r\n");75!=a&&b("IDER-SendData",x.length,rstr2hex(x))};e.SendCommandEndResponse=function(a,b,x,c,g){a?e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,197,0,3,0,0,0,x,80,0,0,0),!0):e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,
33 +135,b<<4,3,0,0,0,x,81,b,c,g),!0)};e.SendDataToHost=function(a,b,x,c){var g=c?0:x.length;1==b?e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,133,0,3,0,0,0,a,80,0,0,0,0,0,0)+x,b,c):e.SendCommand(84,String.fromCharCode(0,x.length&255,x.length>>8,0,c?180:181,0,2,0,g&255,g>>8,a,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+x,b,c)};e.SendGetDataFromHost=function(a,b){e.SendCommand(82,String.fromCharCode(0,b&255,b>>8,0,181,0,0,0,b&255,b>>8,a,88,0,0,0,0,0,0,0,0,0,0,0),
34 !1)};e.SendDisableEnableFeatures=function(a,b){null==b&&(b="");e.SendCommand(72,String.fromCharCode(a)+b)};e.ProcessDataEx=function(){if(8>e.acc.length)return 0;switch(e.acc.charCodeAt(0)){case 65:if(30>e.acc.length)break;var a=e.acc.charCodeAt(29);if(e.acc.length<30+a)break;e.iderinfo={};e.iderinfo.major=e.acc.charCodeAt(8);e.iderinfo.minor=e.acc.charCodeAt(9);e.iderinfo.fwmajor=e.acc.charCodeAt(10);e.iderinfo.fwminor=e.acc.charCodeAt(11);e.iderinfo.readbfr=ReadShortX(e.acc,16);e.iderinfo.writebfr=
35 ReadShortX(e.acc,18);e.iderinfo.proto=e.acc.charCodeAt(21);e.iderinfo.iana=ReadIntX(e.acc,25);b(e.iderinfo);0!=e.iderinfo.proto&&(b("Unknown proto",e.iderinfo.proto),e.Stop());8192<e.iderinfo.readbfr&&(b("Illegal read buffer size",e.iderinfo.readbfr),e.Stop());8192<e.iderinfo.writebfr&&(b("Illegal write buffer size",e.iderinfo.writebfr),e.Stop());0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):2==e.iderStart&&e.SendDisableEnableFeatures(3,
36 -IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),y=ReadIntX(e.acc,9);b("STATUS_DATA",a,y);switch(a){case 1:y&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 -2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=y&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=y&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,y=e.acc.charCodeAt(14),h=e.acc.substring(16,28),x=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(h),x,y);c(a,h,x,y);return 28;case 83:if(14>e.acc.length)break;
38 -a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var C=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
36 +IntToStrX(25));return 30+a;case 67:return b("CLOSE"),e.Stop(),8;case 68:return e.SendCommand(69),8;case 69:return b("PONG"),8;case 70:if(9>e.acc.length)break;a=e.acc.charCodeAt(8);null===J?(e.SendCommand(71),b("RESETOCCURED1",a)):(H=!0,b("RESETOCCURED2",a));return 9;case 73:if(13>e.acc.length)break;var a=e.acc.charCodeAt(8),x=ReadIntX(e.acc,9);b("STATUS_DATA",a,x);switch(a){case 1:x&1&&(0==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(9)):1==e.iderStart?e.SendDisableEnableFeatures(3,IntToStrX(17)):
37 +2==e.iderStart&&e.SendDisableEnableFeatures(3,IntToStrX(25)));break;case 2:e.enabled=x&2?!0:!1;b("IDER Status: "+e.enabled);break;case 3:1!=x&&b("Register toggle failure")}return 13;case 74:if(11>e.acc.length)break;b("IDER: ABORT",e.acc.charCodeAt(8));return 11;case 75:return 8;case 80:if(28>e.acc.length)break;var a=e.acc.charCodeAt(14)&16?176:160,x=e.acc.charCodeAt(14),g=e.acc.substring(16,28),A=e.acc.charCodeAt(9);b("SCSI_CMD",a,rstr2hex(g),A,x);c(a,g,A,x);return 28;case 83:if(14>e.acc.length)break;
38 +a=ReadShortX(e.acc,9);if(e.acc.length<14+a)break;b("SCSI_WRITE, len = "+(14+a));e.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0);return 14+a;default:b("Unknown IDER command",e.acc[0]),e.Stop()}return 0};var E=[],H=!1,J=null,P,r,N;return e},CreateAmtRemoteServerIder=function(){function b(){urlvars&&urlvars.idertrace&&console.log.apply(console,[].concat($jscomp.arrayFromArguments(arguments)))}var c={protocol:4,iderStart:0,floppy:null,cdrom:null,state:0,
39 onStateChanged:null,m:{sectorStats:null,onDialogPrompt:null,dialogPrompt:function(a){c.socket.send(JSON.stringify({action:"dialogResponse",args:a}))},bytesToAmt:0,bytesFromAmt:0,server:!0,Stop:function(){c.Stop()}},xxStateChange:function(a){if(c.state!=a&&(b("SIDER-StateChange",a),c.state=a,null!=c.onStateChanged))c.onStateChanged(c,c.state)},Start:function(a,d,e,v,n){b("SIDER-Start",a,d,e,v,n);c.host=a;c.port=d;c.user=e;c.pass=v;c.connectstate=0;c.socket=new WebSocket(window.location.protocol.replace("http",
40 "ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webider.ashx?host="+a+"&port="+d+"&tls="+n+("*"==e?"&serverauth=1":"")+("undefined"===typeof v?"&serverauth=1&user="+e:"")+"&tls1only="+c.tlsv1only);c.socket.onopen=c.xxOnSocketConnected;c.socket.onmessage=c.xxOnMessage;c.socket.onclose=c.xxOnSocketClosed;c.xxStateChange(1)},Stop:function(){b("SIDER-Stop");null!=c.socket&&(c.socket.close(),c.socket=null);c.xxStateChange(0)},xxOnSocketConnected:function(){c.xxStateChange(2);
41 c.socket.send(JSON.stringify({action:"start"}))},xxOnMessage:function(a){var b=null;try{b=JSON.parse(a.data)}catch(e){}if(null!=b&&"string"==typeof b.action)switch(b.action){case "dialog":if(null!=c.m.onDialogPrompt)c.m.onDialogPrompt(c,b.args,b.buttons);break;case "state":2==b.state&&c.xxStateChange(3);break;case "stats":c.m.bytesToAmt=b.toAmt;c.m.bytesFromAmt=b.fromAmt;c.m.sectorStats&&c.m.sectorStats(b.mode,b.dev,b.total,b.start,b.len);break;case "error":console.log("IDER Error: "+";Floppy disk image does not exist;Invalid floppy disk image;Unable to open floppy disk image;CDROM disk image does not exist;Invalid CDROM disk image;Unable to open CDROM disk image;Can't perform IDER with no disk images".split(";")[b.code]);
42 -break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){q.socketState=2;q.socketParseState=0;q.socketAccumulator="";q.socketHeader=null;q.socketData="";for(i in q.pendingAjaxCall)q.sendRequest(q.pendingAjaxCall[i][0],
43 -q.pendingAjaxCall[i][3],q.pendingAjaxCall[i][4])}function l(a){var b=q.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(q.socketAccumulator=b+a;;){if(0==q.socketParseState){b=q.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;q.socketHeader=q.socketAccumulator.substring(0,b).split("\r\n");if(null==q.amtVersion)for(var c in q.socketHeader)0==q.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(q.amtVersion=q.socketHeader[c].substring(46));
44 -q.socketAccumulator=q.socketAccumulator.substring(b+4);q.socketParseState=1;q.socketData="";q.socketXHeader={Directive:q.socketHeader[0].split(" ")};for(c in q.socketHeader)0!=c&&(b=q.socketHeader[c].indexOf(":"),q.socketXHeader[q.socketHeader[c].substring(0,b).toLowerCase()]=q.socketHeader[c].substring(b+2))}if(1==q.socketParseState){b=-1;if(void 0==q.socketXHeader.connection||"close"!=q.socketXHeader.connection.toLowerCase()||void 0!=q.socketXHeader["transfer-encoding"]&&"chunked"==q.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 -q.socketXHeader["content-length"]){b=parseInt(q.socketXHeader["content-length"]);if(q.socketAccumulator.length<b)break;a=q.socketAccumulator.substring(0,b);q.socketAccumulator=q.socketAccumulator.substring(b);q.socketData=a;b=0}else{var p=q.socketAccumulator.indexOf("\r\n");if(0>p)break;b=parseInt(q.socketAccumulator.substring(0,p),16);if(isNaN(b)){q.websocket&&q.websocket.close();break}if(q.socketAccumulator.length<p+2+b+2)break;a=q.socketAccumulator.substring(p+2,p+2+b);q.socketAccumulator=q.socketAccumulator.substring(p+
46 -2+b+2);q.socketData+=a}else b=0;if(0==b){p=q.socketXHeader;b=q.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(p.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++q.authcounter){if(q.challengeParams=q.parseDigest(p["www-authenticate"]),null!=q.challengeParams.qop){b=q.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?q.challengeParams.qop="auth-int":q.challengeParams.qop="auth"}}else p=q.pendingAjaxCall.shift(),
47 -q.authcounter=0,q.ActiveAjaxCount--,q.gotNextMessages(b,"success",{status:a},p),q.PerformNextAjax();q.socketParseState=0;q.socketHeader=null}}}}function p(a){0==q.inDataCount&&(q.tlsv1only=1-q.tlsv1only);q.socketState=0;null!=q.socket&&(q.socket.close(),q.socket=null);if(0<q.pendingAjaxCall.length){a=q.pendingAjaxCall.shift();var b=a[5];q.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var q={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 -authcounter:0,socket:null,socketState:0};q.host=b;q.port=c;q.user=a;q.pass=d;q.tls=e;q.tlsv1only=0;q.inDataCount=0;q.amtVersion=null;q.digestRealmMatch=null;q.digestRealm=null;q.PerformAjax=function(a,b,c,p,d,k){q.ActiveAjaxCount<q.MaxActiveAjaxCount&&0==q.PendingAjax.length?q.PerformAjaxEx(a,b,c,d,k):1==p?q.PendingAjax.unshift([a,b,c,d,k]):q.PendingAjax.push([a,b,c,d,k])};q.PerformNextAjax=function(){if(!(q.ActiveAjaxCount>=q.MaxActiveAjaxCount||0==q.PendingAjax.length)){var a=q.PendingAjax.shift();
49 -q.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);q.PerformNextAjax()}};q.PerformAjaxEx=function(a,b,c,p,d){if(0!=q.FailAllError)q.gotNextMessagesError({status:q.FailAllError},"error",null,[a,b,c,p,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),q.ActiveAjaxCount++,q.PerformAjaxExNodeJS(a,b,c,p,d)};q.pendingAjaxCall=[];q.PerformAjaxExNodeJS=function(a,b,c,p,d){q.PerformAjaxExNodeJS2(a,b,c,p,d,5)};q.PerformAjaxExNodeJS2=function(a,b,c,p,d,k){0>=k||0!=q.FailAllError?
50 -(q.ActiveAjaxCount--,999!=q.FailAllError&&q.gotNextMessages(null,"error",{status:0==q.FailAllError?408:q.FailAllError},[a,b,c,p,d]),q.PerformNextAjax()):(q.pendingAjaxCall.push([a,b,c,p,d,k]),0==q.socketState?q.xxConnectHttpSocket():2==q.socketState&&q.sendRequest(a,p,d))};q.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var p=c+" "+b+" HTTP/1.1\r\n";if(null!=q.challengeParams){q.digestRealm=q.challengeParams.realm;if(q.digestRealmMatch&&q.digestRealm!=q.digestRealmMatch){q.FailAllError=
51 -997;q.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(q.user+":"+q.challengeParams.realm+":"+q.pass)+":"+q.challengeParams.nonce+":"+q.noncecounter+":"+d+":"+q.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==q.challengeParams.qop?":"+hex_md5(a):"")));p+="Authorization: "+q.renderDigest({username:q.user,realm:q.challengeParams.realm,nonce:q.challengeParams.nonce,uri:b,qop:q.challengeParams.qop,response:c,nc:q.noncecounter++,cnonce:d})+"\r\n"}a=p+="Host: "+
52 -q.host+":"+q.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==q.socketState&&null!=q.socket&&q.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(p=0;p<a.length;++p)b[p]=a.charCodeAt(p);try{q.socket.send(b.buffer)}catch(k){}}};q.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};q.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 -","+c+'="'+a[c]+'"'},"").substring(1)};q.xxConnectHttpSocket=function(){q.inDataCount=0;q.socketState=1;q.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+q.host+"&port="+q.port+"&tls="+q.tls+"&tls1only="+q.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));q.socket.binaryType="arraybuffer";q.socket.onopen=n;
54 -q.socket.onmessage=l;q.socket.onclose=p};q.gotNextMessages=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](a,c.status,p[2])};q.gotNextMessagesError=function(a,b,c,p){if(999!=q.FailAllError)if(0!=q.FailAllError)p[1](null,q.FailAllError,p[2]);else p[1](q,null,{Header:{HttpError:a.status}},a.status,p[2])};q.CancelAllQueries=function(a){for(;0<q.PendingAjax.length;){var b=q.PendingAjax.shift();b[1](null,a,b[2])}null!=q.websocket&&(q.websocket.close(),
55 -q.websocket=null,q.socketState=0)};return q},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,p){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 -0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+p+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
42 +break;default:console.log("Unknown Server IDER action: "+b.action),breal}},xxOnSocketClosed:function(){c.Stop()}};return c},CreateWsmanComm=function(b,c,a,d,e){function v(a){return a.split(",").reduce(function(a,b){a.ic?a.st[a.st.length-1]+=","+b:a.st.push(b);0==b.split('"').length%2&&(a.ic=!a.ic);return a},{st:[],ic:!1}).st}function n(){p.socketState=2;p.socketParseState=0;p.socketAccumulator="";p.socketHeader=null;p.socketData="";for(i in p.pendingAjaxCall)p.sendRequest(p.pendingAjaxCall[i][0],
43 +p.pendingAjaxCall[i][3],p.pendingAjaxCall[i][4])}function l(a){var b=p.socketAccumulator;a=new Uint8Array(a.data);a=String.fromCharCode.apply(null,a);for(p.socketAccumulator=b+a;;){if(0==p.socketParseState){b=p.socketAccumulator.indexOf("\r\n\r\n");if(0>b)break;p.socketHeader=p.socketAccumulator.substring(0,b).split("\r\n");if(null==p.amtVersion)for(var c in p.socketHeader)0==p.socketHeader[c].indexOf("Server: Intel(R) Active Management Technology ")&&(p.amtVersion=p.socketHeader[c].substring(46));
44 +p.socketAccumulator=p.socketAccumulator.substring(b+4);p.socketParseState=1;p.socketData="";p.socketXHeader={Directive:p.socketHeader[0].split(" ")};for(c in p.socketHeader)0!=c&&(b=p.socketHeader[c].indexOf(":"),p.socketXHeader[p.socketHeader[c].substring(0,b).toLowerCase()]=p.socketHeader[c].substring(b+2))}if(1==p.socketParseState){b=-1;if(void 0==p.socketXHeader.connection||"close"!=p.socketXHeader.connection.toLowerCase()||void 0!=p.socketXHeader["transfer-encoding"]&&"chunked"==p.socketXHeader["transfer-encoding"].toLowerCase())if(void 0!=
45 +p.socketXHeader["content-length"]){b=parseInt(p.socketXHeader["content-length"]);if(p.socketAccumulator.length<b)break;a=p.socketAccumulator.substring(0,b);p.socketAccumulator=p.socketAccumulator.substring(b);p.socketData=a;b=0}else{var q=p.socketAccumulator.indexOf("\r\n");if(0>q)break;b=parseInt(p.socketAccumulator.substring(0,q),16);if(isNaN(b)){p.websocket&&p.websocket.close();break}if(p.socketAccumulator.length<q+2+b+2)break;a=p.socketAccumulator.substring(q+2,q+2+b);p.socketAccumulator=p.socketAccumulator.substring(q+
46 +2+b+2);p.socketData+=a}else b=0;if(0==b){q=p.socketXHeader;b=p.socketData;urlvars&&urlvars.wsmantrace&&console.log("WSMAN-RECV("+b.length+"): "+b);a=parseInt(q.Directive[1]);isNaN(a)&&(a=602);if(401==a&&3>++p.authcounter){if(p.challengeParams=p.parseDigest(q["www-authenticate"]),null!=p.challengeParams.qop){b=p.challengeParams.qop.split(",");a=void 0;for(a in b)b[a]=b[a].trim();0<=b.indexOf("auth-int")?p.challengeParams.qop="auth-int":p.challengeParams.qop="auth"}}else q=p.pendingAjaxCall.shift(),
47 +p.authcounter=0,p.ActiveAjaxCount--,p.gotNextMessages(b,"success",{status:a},q),p.PerformNextAjax();p.socketParseState=0;p.socketHeader=null}}}}function q(a){0==p.inDataCount&&(p.tlsv1only=1-p.tlsv1only);p.socketState=0;null!=p.socket&&(p.socket.close(),p.socket=null);if(0<p.pendingAjaxCall.length){a=p.pendingAjaxCall.shift();var b=a[5];p.PerformAjaxExNodeJS2(a[0],a[1],a[2],a[3],a[4],--b)}}var p={PendingAjax:[],ActiveAjaxCount:0,MaxActiveAjaxCount:1,FailAllError:0,challengeParams:null,noncecounter:1,
48 +authcounter:0,socket:null,socketState:0};p.host=b;p.port=c;p.user=a;p.pass=d;p.tls=e;p.tlsv1only=0;p.inDataCount=0;p.amtVersion=null;p.digestRealmMatch=null;p.digestRealm=null;p.PerformAjax=function(a,b,c,q,d,k){p.ActiveAjaxCount<p.MaxActiveAjaxCount&&0==p.PendingAjax.length?p.PerformAjaxEx(a,b,c,d,k):1==q?p.PendingAjax.unshift([a,b,c,d,k]):p.PendingAjax.push([a,b,c,d,k])};p.PerformNextAjax=function(){if(!(p.ActiveAjaxCount>=p.MaxActiveAjaxCount||0==p.PendingAjax.length)){var a=p.PendingAjax.shift();
49 +p.PerformAjaxEx(a[0],a[1],a[2],a[3],a[4]);p.PerformNextAjax()}};p.PerformAjaxEx=function(a,b,c,q,d){if(0!=p.FailAllError)p.gotNextMessagesError({status:p.FailAllError},"error",null,[a,b,c,q,d]);else return a||(a=""),urlvars&&urlvars.wsmantrace&&console.log("WSMAN-SEND("+a.length+"): "+a),p.ActiveAjaxCount++,p.PerformAjaxExNodeJS(a,b,c,q,d)};p.pendingAjaxCall=[];p.PerformAjaxExNodeJS=function(a,b,c,q,d){p.PerformAjaxExNodeJS2(a,b,c,q,d,5)};p.PerformAjaxExNodeJS2=function(a,b,c,q,d,k){0>=k||0!=p.FailAllError?
50 +(p.ActiveAjaxCount--,999!=p.FailAllError&&p.gotNextMessages(null,"error",{status:0==p.FailAllError?408:p.FailAllError},[a,b,c,q,d]),p.PerformNextAjax()):(p.pendingAjaxCall.push([a,b,c,q,d,k]),0==p.socketState?p.xxConnectHttpSocket():2==p.socketState&&p.sendRequest(a,q,d))};p.sendRequest=function(a,b,c){b=b?b:"/wsman";c=c?c:"POST";var q=c+" "+b+" HTTP/1.1\r\n";if(null!=p.challengeParams){p.digestRealm=p.challengeParams.realm;if(p.digestRealmMatch&&p.digestRealm!=p.digestRealmMatch){p.FailAllError=
51 +997;p.CancelAllQueries(997);return}var d=Math.random().toString(36).substring(7);c=hex_md5(hex_md5(p.user+":"+p.challengeParams.realm+":"+p.pass)+":"+p.challengeParams.nonce+":"+p.noncecounter+":"+d+":"+p.challengeParams.qop+":"+hex_md5(c+":"+b+("auth-int"==p.challengeParams.qop?":"+hex_md5(a):"")));q+="Authorization: "+p.renderDigest({username:p.user,realm:p.challengeParams.realm,nonce:p.challengeParams.nonce,uri:b,qop:p.challengeParams.qop,response:c,nc:p.noncecounter++,cnonce:d})+"\r\n"}a=q+="Host: "+
52 +p.host+":"+p.port+"\r\nContent-Length: "+a.length+"\r\n\r\n"+a;if(2==p.socketState&&null!=p.socket&&p.socket.readyState==WebSocket.OPEN){b=new Uint8Array(a.length);for(q=0;q<a.length;++q)b[q]=a.charCodeAt(q);try{p.socket.send(b.buffer)}catch(k){}}};p.parseDigest=function(a){return v(a.substring(7)).reduce(function(a,b){var c=b.trim().split("=");a[c[0]]=c[1].replace(RegExp('"',"g"),"");return a},{})};p.renderDigest=function(a){var b=[];for(i in a)b.push(i);return"Digest "+b.reduce(function(b,c){return b+
53 +","+c+'="'+a[c]+'"'},"").substring(1)};p.xxConnectHttpSocket=function(){p.inDataCount=0;p.socketState=1;p.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=1&host="+p.host+"&port="+p.port+"&tls="+p.tls+"&tls1only="+p.tlsv1only+("*"==a?"&serverauth=1":"")+("undefined"===typeof d?"&serverauth=1&user="+a:""));p.socket.binaryType="arraybuffer";p.socket.onopen=n;
54 +p.socket.onmessage=l;p.socket.onclose=q};p.gotNextMessages=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](a,c.status,q[2])};p.gotNextMessagesError=function(a,b,c,q){if(999!=p.FailAllError)if(0!=p.FailAllError)q[1](null,p.FailAllError,q[2]);else q[1](p,null,{Header:{HttpError:a.status}},a.status,q[2])};p.CancelAllQueries=function(a){for(;0<p.PendingAjax.length;){var b=p.PendingAjax.shift();b[1](null,a,b[2])}null!=p.websocket&&(p.websocket.close(),
55 +p.websocket=null,p.socketState=0)};return p},CreateAmtRedirect=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}var d={};d.m=b;b.parent=d;d.authCookie=c;d.State=0;d.socket=null;d.host=null;d.port=0;d.user=null;d.pass=null;d.authuri="/RedirectionService";d.tlsv1only=0;d.inDataCount=0;d.connectstate=0;d.protocol=b.protocol;d.acc=null;d.amtsequence=1;d.amtkeepalivetimer=null;d.onStateChanged=null;d.Start=function(a,b,n,l,q){d.host=a;d.port=b;d.user=n;d.pass=l;d.connectstate=0;d.inDataCount=
56 +0;a=window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+a+"&port="+b+"&tls="+q+("*"==n?"&serverauth=1":"")+("undefined"===typeof l?"&serverauth=1&user="+n:"");null!=c&&""!=c&&(a+="&auth="+c);d.socket=new WebSocket(a);d.socket.binaryType="arraybuffer";d.socket.onopen=d.xxOnSocketConnected;d.socket.onmessage=d.xxOnMessage;d.socket.onclose=d.xxOnSocketClosed;d.xxStateChange(1)};
57 d.xxOnSocketConnected=function(){d.xxStateChange(2);1==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,83,79,76,32]));2==d.protocol&&d.directSend(new Uint8Array([16,1,0,0,75,86,77,82]));3==d.protocol&&d.directSend(new Uint8Array([16,0,0,0,73,68,69,82]))};d.xxOnMessage=function(b){if(b.data&&-1!=d.connectstate){d.inDataCount++;if(1==d.connectstate&&(2==d.protocol||3==d.protocol))return d.m.ProcessBinaryData?d.m.ProcessBinaryData(b.data):d.m.ProcessData(a(new Uint8Array(b.data)));if(null==d.acc)d.acc=
58 b.data;else{var c=new Uint8Array(d.acc.byteLength+b.data.byteLength);c.set(new Uint8Array(d.acc),0);c.set(new Uint8Array(b.data),d.acc.byteLength);d.acc=c.buffer}for(;null!=d.acc&&1<=d.acc.byteLength;){b=0;var n=new Uint8Array(d.acc);switch(n[0]){case 17:if(4>n.byteLength)return;switch(n[1]){case 0:if(13>n.byteLength)return;b=n[12];if(n.byteLength<13+b)return;d.directSend(new Uint8Array([19,0,0,0,0,0,0,0,0]));b=13+b;break;default:d.Stop(1)}break;case 20:if(9>n.byteLength)return;b=(new DataView(d.acc)).getUint32(5,
59 -!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],p=[];for(i=0;i<b;i++)p.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=p.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=p.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 -d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=p.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 -ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var q=0,p=n[q],l=a(new Uint8Array(n.buffer.slice(q+1,q+1+p))),q=q+(p+1),h=n[q],p=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),q=q+(h+1),h=0,h=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(h=n[q],h=a(new Uint8Array(n.buffer.slice(q+1,q+1+h))),w="00000002:"+B+":"+h+":");n=hex_md5(hex_md5(d.user+
62 -":"+l+":"+d.pass)+":"+p+":"+w+hex_md5("POST:"+d.authuri));q=d.user.length+l.length+p.length+d.authuri.length+B.length+8+n.length+7;4==c&&(q+=h.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(q)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(p.length)+p+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(h.length)+h);d.xxSend(n)}break;
59 +!0);if(n.byteLength<9+b)return;var l=n[1],c=n[4],q=[];for(i=0;i<b;i++)q.push(n[9+i]);n=new Uint8Array(d.acc.slice(9,9+b));b=9+b;if(0==c)0<=q.indexOf(4)?d.xxSend(String.fromCharCode(19,0,0,0,4)+IntToStrX(d.user.length+d.authuri.length+8)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0,0)):0<=q.indexOf(3)?d.xxSend(String.fromCharCode(19,0,0,0,3)+IntToStrX(d.user.length+d.authuri.length+7)+String.fromCharCode(d.user.length)+
60 +d.user+String.fromCharCode(0,0)+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(0,0,0)):0<=q.indexOf(1)?d.xxSend(String.fromCharCode(19,0,0,0,1)+IntToStrX(d.user.length+d.pass.length+2)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(d.pass.length)+d.pass):d.Stop(2);else if(3!=c&&4!=c||1!=l)if(0==l)switch(d.protocol){case 1:d.xxSend(String.fromCharCode(32,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(1E4)+ShortToStrX(100)+ShortToStrX(0)+ShortToStrX(1E4)+ShortToStrX(100)+
61 +ShortToStrX(0)+IntToStrX(0));break;case 2:d.directSend(new Uint8Array([64,0,0,0,0,0,0,0]));break;case 3:d.connectstate=1,d.xxStateChange(3)}else d.Stop(3);else{var p=0,q=n[p],l=a(new Uint8Array(n.buffer.slice(p+1,p+1+q))),p=p+(q+1),g=n[p],q=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),p=p+(g+1),g=0,g=null,B;B="";for(var w=0;32>w;w++)B+="abcdef0123456789".charAt(Math.floor(16*Math.random()));w="";4==c&&(g=n[p],g=a(new Uint8Array(n.buffer.slice(p+1,p+1+g))),w="00000002:"+B+":"+g+":");n=hex_md5(hex_md5(d.user+
62 +":"+l+":"+d.pass)+":"+q+":"+w+hex_md5("POST:"+d.authuri));p=d.user.length+l.length+q.length+d.authuri.length+B.length+8+n.length+7;4==c&&(p+=g.length+1);n=String.fromCharCode(19,0,0,0,c)+IntToStrX(p)+String.fromCharCode(d.user.length)+d.user+String.fromCharCode(l.length)+l+String.fromCharCode(q.length)+q+String.fromCharCode(d.authuri.length)+d.authuri+String.fromCharCode(B.length)+B+String.fromCharCode(8)+"00000002"+String.fromCharCode(n.length)+n;4==c&&(n+=String.fromCharCode(g.length)+g);d.xxSend(n)}break;
63 case 33:if(23>n.byteLength)break;b=23;d.xxSend(String.fromCharCode(39,0,0,0)+IntToStrX(d.amtsequence++)+String.fromCharCode(0,0,27,0,0,0));1==d.protocol&&(d.amtkeepalivetimer=setInterval(d.xxSendAmtKeepAlive,2E3));d.connectstate=1;d.xxStateChange(3);break;case 41:if(10>n.byteLength)break;b=10;break;case 42:if(10>n.byteLength)break;c=10+(n[9]<<8)+n[8];if(n.byteLength<c)break;d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(10,c))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(10,
64 c))));b=c;break;case 43:if(8>n.byteLength)break;b=8;break;case 65:if(8>n.byteLength)break;d.connectstate=1;d.m.Start();8<n.byteLength&&(d.m.ProcessBinaryData?d.m.ProcessBinaryData(new Uint8Array(n.buffer.slice(8))):d.m.ProcessData(a(new Uint8Array(n.buffer.slice(8)))));b=n.byteLength;break;case 240:d.serverIsRecording=!0;b=1;break;default:console.log("Unknown Intel AMT command: "+n[0]+" acclen="+n.byteLength);d.Stop(4);return}if(0==b)break;d.acc=b!=d.acc.byteLength?d.acc.slice(b):null}}};d.directSend=
65 function(a){try{d.socket.send(a.buffer)}catch(b){}};d.xxSend=function(a){if(null!=d.socket&&d.socket.readyState==WebSocket.OPEN){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);try{d.socket.send(b.buffer)}catch(l){}}};d.Send=d.send=function(a){null!=d.socket&&1==d.connectstate&&(1==d.protocol?d.xxSend(String.fromCharCode(40,0,0,0)+IntToStrX(d.amtsequence++)+ShortToStrX(a.length)+a):d.xxSend(a))};d.xxSendAmtKeepAlive=function(){null!=d.socket&&d.xxSend(String.fromCharCode(43,
66 0,0,0)+IntToStrX(d.amtsequence++))};d.xxOnSocketClosed=function(){0==d.inDataCount&&0==d.tlsv1only?(d.tlsv1only=1,d.socket=new WebSocket(window.location.protocol.replace("http","ws")+"//"+window.location.host+window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))+"/webrelay.ashx?p=2&host="+d.host+"&port="+d.port+"&tls="+d.tls+"&tls1only=1"+("*"==d.user?"&serverauth=1":"")+("undefined"===typeof pass?"&serverauth=1&user="+d.user:"")),d.socket.binaryType="arraybuffer",d.socket.onopen=
67 d.xxOnSocketConnected,d.socket.onmessage=d.xxOnMessage,d.socket.onclose=d.xxOnSocketClosed):d.Stop(5)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(a){d.xxStateChange(0);d.connectstate=-1;d.acc=null;null!=d.socket&&(d.socket.close(),d.socket=null);null!=d.amtkeepalivetimer&&(clearInterval(d.amtkeepalivetimer),d.amtkeepalivetimer=null)};return d},WsmanStackCreateService=function(b,c,a,d,e,v){function n(a){for(var b,
68 -c={},p=0;p<a.childNodes.length;p++){var d=a.childNodes[p];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 -"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function p(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 -a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),p=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(p))for(var d=0;d<p.length;d++)b+="<w:Selector"+l(p[d])+">"+p[d].Value+"</w:Selector>";else b+="<w:Selector"+l(p)+">"+p.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var q={NextMessageId:1,Address:"/wsman"};q.comm=CreateWsmanComm(b,c,a,d,e,v);q.PerformAjax=function(a,
71 -b,c,p,d){null==d&&(d="");q.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,p){var d=q.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 -c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(h){}}b(q,d.Header.ResourceURI,d,c,p)}else b(q,null,{Header:{HttpError:c}},601,p)},c,p)};q.CancelAllQueries=function(a){q.comm.CancelAllQueries(a)};q.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};q.ExecSubscribe=function(a,b,c,d,m,k,g,u,e,l){var y="",z="";u="";null!=e&&null!=l&&(y='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
68 +c={},q=0;q<a.childNodes.length;q++){var d=a.childNodes[q];b=null==d.childElementCount||0==d.childElementCount?d.textContent:n(d);"true"==b&&(b=!0);"false"==b&&(b=!1);parseInt(b)+""===b&&(b=parseInt(b));var k=b;if(null!=d.attributes&&0<d.attributes.length)for(k={Value:b},b=0;b<d.attributes.length;b++)k["@"+d.attributes[b].name]=d.attributes[b].value;c[d.localName]instanceof Array?c[d.localName].push(k):c[d.localName]=null==c[d.localName]?k:[c[d.localName],k]}return c}function l(a){if(!a)return"";var b=
69 +"",c;for(c in a)a.hasOwnProperty(c)&&0===c.indexOf("@")&&(b+=" "+c.substring(1)+'="'+a[c]+'"');return b}function q(a){if(!a)return"";if("string"==typeof a)return a;if(a.InstanceID)return'<w:SelectorSet><w:Selector Name="InstanceID">'+a.InstanceID+"</w:Selector></w:SelectorSet>";var b="<w:SelectorSet>",c;for(c in a)if(a.hasOwnProperty(c)){b+='<w:Selector Name="'+c+'">';if(a[c].ReferenceParameters){var b=b+"<a:EndpointReference>",b=b+("<a:Address>"+a[c].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+
70 +a[c].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>"),q=a[c].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(q))for(var d=0;d<q.length;d++)b+="<w:Selector"+l(q[d])+">"+q[d].Value+"</w:Selector>";else b+="<w:Selector"+l(q)+">"+q.Value+"</w:Selector>";b+="</w:SelectorSet></a:ReferenceParameters></a:EndpointReference>"}else b+=a[c];b+="</w:Selector>"}return b+"</w:SelectorSet>"}var p={NextMessageId:1,Address:"/wsman"};p.comm=CreateWsmanComm(b,c,a,d,e,v);p.PerformAjax=function(a,
71 +b,c,q,d){null==d&&(d="");p.comm.PerformAjax('<?xml version="1.0" encoding="utf-8"?><Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns="http://www.w3.org/2003/05/soap-envelope" '+d+"><Header><a:Action>"+a,function(a,c,q){var d=p.ParseWsman(a);if(null==a||d&&null!=d||200!=c){if(200!=c){null==d&&(d={Header:{}});d.Header.HttpError=
72 +c;try{d.Header.WsmanError=d.Body.Reason.Text.Value}catch(g){}}b(p,d.Header.ResourceURI,d,c,q)}else b(p,null,{Header:{HttpError:c}},601,q)},c,q)};p.CancelAllQueries=function(a){p.comm.CancelAllQueries(a)};p.GetNameFromUrl=function(a){var b=a.lastIndexOf("/");return-1==b?a:a.substring(b+1)};p.ExecSubscribe=function(a,b,c,d,m,k,h,u,e,l){var x="",z="";u="";null!=e&&null!=l&&(x='<t:IssuedTokens xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><t:RequestSecurityTokenResponse><t:TokenType>http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken</t:TokenType><t:RequestedSecurityToken><se:UsernameToken><se:Username>'+
73 e+'</se:Username><se:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#PasswordText">'+l+"</se:Password></se:UsernameToken></t:RequestedSecurityToken></t:RequestSecurityTokenResponse></t:IssuedTokens>",z='<w:Auth Profile="http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/digest"/>');null!=u&&(u="<a:ReferenceParameters><m:arg>"+u+"</m:arg></a:ReferenceParameters>");"PushWithAck"==b?b="dmtf.org/wbem/wsman/1/wsman/PushWithAck":"Push"==b&&(b="xmlsoap.org/ws/2004/08/eventing/DeliveryModes/Push");
74 -a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(g)+y+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";q.PerformAjax(a+"</Body></Envelope>",d,m,
75 -k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};q.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+p(m)+"</Header><Body><e:Unsubscribe/>";q.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 -q.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+p(k)+"</Header><Body>";if(a&&null!=b){var g=q.GetNameFromUrl(a);a="<r:"+g+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 -0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var D=0;D<e.length;D++)a+="<w:Selector"+l(e[D])+">"+e[D].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 -a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(D=0;D<b[u].length;D++)a+="<r:"+u+">"+b[u][D].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+g+">")}else b="";q.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};q.ExecCreate=function(a,b,c,d,m,k){var g=q.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
79 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(k)+"</Header><Body><g:"+g+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";q.PerformAjax(a+"</g:"+g+"></Body></Envelope>",c,d,m)};q.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +
80 -"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+p(b)+"</Header><Body /></Envelope>";q.PerformAjax(a,c,d,m)};q.ExecGet=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 -b,c,p)};q.ExecMethod=function(a,b,c,p,d,k,g){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var D in c[l])e+="<r:"+l+">"+c[l][D]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";q.ExecMethodXml(a,b,e,p,d,k,g)};q.ExecMethodXml=function(a,b,c,d,m,k,g){q.PerformAjax(a+"/"+b+"</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 -p(g)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};q.ExecEnum=function(a,b,c,p){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 -b,c,p)};q.ExecPull=function(a,b,c,p,d){q.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+q.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+q.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 -c,p,d)};q.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var p=new ActiveXObject("Microsoft.XMLDOM");p.async=!1;p.loadXML(c);a=p}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var g=d.childNodes[c];b.Header[g.localName]=g.textContent}var q=a.getElementsByTagName("Body")[0];q||(q=a.getElementsByTagName("a:Body")[0]);
85 -if(!q)return null;if(0<q.childNodes.length){k=q.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(q.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",q,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return q};
86 -function AmtStackCreateService(b){function c(){var a=h.GetPendingActions();B<a&&(B=a);null!=h.onProcessChanged&&w!=a&&(w=a,h.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,p,x,C,g){200!=x?(c(h,a,null,x,C),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?h.wsman.ExecPull(p,b.Body.EnumerationContext,function(b,p,x,h){d(a,x,c,p,[],h,C,g)}):(c(h,a,null,603,C),e(1))}function d(a,b,p,g,x,C,k,m){if(200!=C)p(h,a,null,C,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)p(h,
87 -a,null,604,k),e(1);else{for(var q in b.Body.Items)if(b.Body.Items[q]instanceof Array)for(var u in b.Body.Items[q])"function"!=typeof b.Body.Items[q][u]&&x.push(b.Body.Items[q][u]);else"function"!=typeof b.Body.Items[q]&&x.push(b.Body.Items[q]);b.Body.EnumerationContext?h.wsman.ExecPull(g,b.Body.EnumerationContext,function(b,c,h,z){d(a,h,p,c,x,z,k,1)}):(e(1),p(h,a,x,C,k),c())}}function e(a){h.ActiveEnumsCount-=a;h.ActiveEnumsCount>=h.MaxActiveEnumsCount||0==h.PendingEnums.length?c():(a=h.PendingEnums.shift(),
88 -h.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(h,a.name,a.responses,200,a.tag):(h.wsman.ExecGet(h.CompleteName(a.names[a.current]),function(b,c,p,d){null==p||200!=d?a.callback(h,a.name,null,d,a.tag):(a.responses[p.Header.Method]=p,v(a))},a.pri),a.current++);c()}function n(a,b,c,p,d){if(200!=p||"0"!=c.Body.ReturnValue)d[0](h,null,d[2]);else h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,x){if(200!=d||"0"!=c.Body.ReturnValue)x[0](h,
89 -null,x[2]);else{var C,g,m;b=x[2];d=new Date;var q=c.Body.RecordArray;"string"===typeof q&&(c.Body.RecordArray=[c.Body.RecordArray]);for(C in q){a=null;try{a=window.atob(q[C])}catch(e){}if(null!=a&&(g=ReadIntX(a,0),0<g&&4294967295>g)){m={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 -EventData:[],Time:new Date(1E3*(g+60*d.getTimezoneOffset()))};for(g=13;21>g;g++)m.EventData.push(a.charCodeAt(g));m.EntityStr=k[m.Entity];m.Desc=p(m.EventSensorType,m.EventOffset,m.EventData,m.Entity);m.EntityStr||(m.EntityStr="Unknown");b.push(m)}}if(1!=c.Body.NoMoreRecords)h.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[x[0],b,x[2]]);else x[0](h,b,x[2])}}function p(a,b,c,p){if(15==a){if(235==c[0])return"Invalid Data";if(0==b)return E[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 -u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",g[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
74 +a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(h)+x+'</Header><Body><e:Subscribe><e:Delivery Mode="http://schemas.'+b+'"><e:NotifyTo><a:Address>'+c+"</a:Address>"+u+"</e:NotifyTo>"+z+"</e:Delivery></e:Subscribe>";p.PerformAjax(a+"</Body></Envelope>",d,m,
75 +k,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:m="http://x.com"')};p.ExecUnSubscribe=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo>"+q(m)+"</Header><Body><e:Unsubscribe/>";p.PerformAjax(a+"</Body></Envelope>",b,c,d,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')};
76 +p.ExecPut=function(a,b,c,d,m,k){k="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60.000S</w:OperationTimeout>"+q(k)+"</Header><Body>";if(a&&null!=b){var h=p.GetNameFromUrl(a);a="<r:"+h+' xmlns:r="'+a+'">';for(var u in b)if(b.hasOwnProperty(u)&&
77 +0!==u.indexOf("__")&&0!==u.indexOf("@")&&null!=b[u]&&"function"!==typeof b[u])if("object"===typeof b[u]&&b[u].ReferenceParameters){a+="<r:"+u+"><a:Address>"+b[u].Address+"</a:Address><a:ReferenceParameters><w:ResourceURI>"+b[u].ReferenceParameters.ResourceURI+"</w:ResourceURI><w:SelectorSet>";var e=b[u].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(e))for(var C=0;C<e.length;C++)a+="<w:Selector"+l(e[C])+">"+e[C].Value+"</w:Selector>";else a+="<w:Selector"+l(e)+">"+e.Value+"</w:Selector>";
78 +a+="</w:SelectorSet></a:ReferenceParameters></r:"+u+">"}else if(Array.isArray(b[u]))for(C=0;C<b[u].length;C++)a+="<r:"+u+">"+b[u][C].toString()+"</r:"+u+">";else a+="<r:"+u+">"+b[u].toString()+"</r:"+u+">";b=a+("</r:"+h+">")}else b="";p.PerformAjax(k+b+"</Body></Envelope>",c,d,m)};p.ExecCreate=function(a,b,c,d,m,k){var h=p.GetNameFromUrl(a);a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
79 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(k)+"</Header><Body><g:"+h+' xmlns:g="'+a+'">';for(var e in b)a+="<g:"+e+">"+b[e]+"</g:"+e+">";p.PerformAjax(a+"</g:"+h+"></Body></Envelope>",c,d,m)};p.ExecDelete=function(a,b,c,d,m){a="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +
80 +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+q(b)+"</Header><Body /></Envelope>";p.PerformAjax(a,c,d,m)};p.ExecGet=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body /></Envelope>",
81 +b,c,q)};p.ExecMethod=function(a,b,c,q,d,k,h){var e="",l;for(l in c)if(null!=c[l])if(Array.isArray(c[l]))for(var C in c[l])e+="<r:"+l+">"+c[l][C]+"</r:"+l+">";else e+="<r:"+l+">"+c[l]+"</r:"+l+">";p.ExecMethodXml(a,b,e,q,d,k,h)};p.ExecMethodXml=function(a,b,c,d,m,k,h){p.PerformAjax(a+"/"+b+"</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +"</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout>"+
82 +q(h)+"</Header><Body><r:"+b+'_INPUT xmlns:r="'+a+'">'+c+"</r:"+b+"_INPUT></Body></Envelope>",d,m,k)};p.ExecEnum=function(a,b,c,q){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Enumerate xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration" /></Body></Envelope>',
83 +b,c,q)};p.ExecPull=function(a,b,c,q,d){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull</a:Action><a:To>"+p.Address+"</a:To><w:ResourceURI>"+a+"</w:ResourceURI><a:MessageID>"+p.NextMessageId++ +'</a:MessageID><a:ReplyTo><a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address></a:ReplyTo><w:OperationTimeout>PT60S</w:OperationTimeout></Header><Body><Pull xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration"><EnumerationContext>'+b+"</EnumerationContext></Pull></Body></Envelope>",
84 +c,q,d)};p.ParseWsman=function(a){if(null==a)return null;var b={Header:{}};try{if(!a.childNodes){var c=a;if(window.DOMParser)a=(new DOMParser).parseFromString(c,"text/xml");else{var q=new ActiveXObject("Microsoft.XMLDOM");q.async=!1;q.loadXML(c);a=q}}var d=a.getElementsByTagName("Header")[0],k;d||(d=a.getElementsByTagName("a:Header")[0]);if(!d)return null;for(c=0;c<d.childNodes.length;c++){var h=d.childNodes[c];b.Header[h.localName]=h.textContent}var p=a.getElementsByTagName("Body")[0];p||(p=a.getElementsByTagName("a:Body")[0]);
85 +if(!p)return null;if(0<p.childNodes.length){k=p.childNodes[0].localName;var e=k.indexOf("_OUTPUT");-1!=e&&e==k.length-7&&(k=k.substring(0,k.length-7));b.Header.Method=k;try{b.Body=n(p.childNodes[0])}catch(l){return console.log("_ParseWsmanRec failed",p,l),null}}}catch(l){return console.log("Unable to parse XML: "+a+", "+l),null}return b};return p};
86 +function AmtStackCreateService(b){function c(){var a=g.GetPendingActions();B<a&&(B=a);null!=g.onProcessChanged&&w!=a&&(w=a,g.onProcessChanged(a,B));0==a&&(B=0)}function a(a,b,c,q,y,h,k){200!=y?(c(g,a,null,y,h),e(1)):null!=b&&"EnumerateResponse"==b.Header.Method&&b.Body.EnumerationContext?g.wsman.ExecPull(q,b.Body.EnumerationContext,function(b,q,y,g){d(a,y,c,q,[],g,h,k)}):(c(g,a,null,603,h),e(1))}function d(a,b,q,h,y,E,k,m){if(200!=E)q(g,a,null,E,k),e(1);else if(null==b||"PullResponse"!=b.Header.Method)q(g,
87 +a,null,604,k),e(1);else{for(var p in b.Body.Items)if(b.Body.Items[p]instanceof Array)for(var u in b.Body.Items[p])"function"!=typeof b.Body.Items[p][u]&&y.push(b.Body.Items[p][u]);else"function"!=typeof b.Body.Items[p]&&y.push(b.Body.Items[p]);b.Body.EnumerationContext?g.wsman.ExecPull(h,b.Body.EnumerationContext,function(b,c,g,z){d(a,g,q,c,y,z,k,1)}):(e(1),q(g,a,y,E,k),c())}}function e(a){g.ActiveEnumsCount-=a;g.ActiveEnumsCount>=g.MaxActiveEnumsCount||0==g.PendingEnums.length?c():(a=g.PendingEnums.shift(),
88 +g.Enum(a[0],a[1],a[2]),e(0))}function v(a){a.names.length<=a.current?a.callback(g,a.name,a.responses,200,a.tag):(g.wsman.ExecGet(g.CompleteName(a.names[a.current]),function(b,c,q,d){null==q||200!=d?a.callback(g,a.name,null,d,a.tag):(a.responses[q.Header.Method]=q,v(a))},a.pri),a.current++);c()}function n(a,b,c,q,d){if(200!=q||"0"!=c.Body.ReturnValue)d[0](g,null,d[2]);else g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,d)}function l(a,b,c,d,y){if(200!=d||"0"!=c.Body.ReturnValue)y[0](g,
89 +null,y[2]);else{var h,m,p;b=y[2];d=new Date;var e=c.Body.RecordArray;"string"===typeof e&&(c.Body.RecordArray=[c.Body.RecordArray]);for(h in e){a=null;try{a=window.atob(e[h])}catch(u){}if(null!=a&&(m=ReadIntX(a,0),0<m&&4294967295>m)){p={DeviceAddress:a.charCodeAt(4),EventSensorType:a.charCodeAt(5),EventType:a.charCodeAt(6),EventOffset:a.charCodeAt(7),EventSourceType:a.charCodeAt(8),EventSeverity:a.charCodeAt(9),SensorNumber:a.charCodeAt(10),Entity:a.charCodeAt(11),EntityInstance:a.charCodeAt(12),
90 +EventData:[],Time:new Date(1E3*(m+60*d.getTimezoneOffset()))};for(m=13;21>m;m++)p.EventData.push(a.charCodeAt(m));p.EntityStr=k[p.Entity];p.Desc=q(p.EventSensorType,p.EventOffset,p.EventData,p.Entity);p.EntityStr||(p.EntityStr="Unknown");b.push(p)}}if(1!=c.Body.NoMoreRecords)g.AMT_MessageLog_GetRecords(c.Body.IterationIdentifier,390,l,[y[0],b,y[2]]);else y[0](g,b,y[2])}}function q(a,b,c,q){if(15==a){if(235==c[0])return"Invalid Data";if(0==b)return D[c[1]];if(3==b){if(170==c[0]&&48==c[1])return format("AMT One Click Recovery: {0}",
91 +u[c[2]]);if(170==c[0]&&64==c[1]){if(1==c[2])return"Got an error erasing Device SSD";if(2==c[2])return"Erasing Device TPM is not supported";if(3==c[2])return"Reached Max Counter"}else return"OEM Specific Firmware Error event"}else if(5==b){if(170==c[0]&&48==c[1])return 1==c[2]?format("AMT One Click Recovery: CSME Boot Option {0}:{1} added successfully",c[3],O[c[3]]):7>c[2]?format("AMT One Click Recovery: {0}",h[c[2]]):format("AMT One Click Recovery: Unknown progress event {0}",c[2]);if(170==c[0]&&
92 64==c[1]){if(1==c[2]){if(2==c[3])return"Started erasing Device SSD";if(3==c[3])return"Started erasing Device TPM";if(5==c[3])return"Started erasing Device BIOS Reload of Golden Config"}if(2==c[2]){if(2==c[3])return"Erasing Device SSD ended successfully";if(3==c[3])return"Erasing Device TPM ended successfully";if(5==c[3])return"Erasing Device BIOS Reload of Golden Config ended successfully"}if(3==c[2])return"Beginning Platform Erase";if(4==c[2])return"Clear Reserved Parameters";if(5==c[2])return"All setting decremented"}else return"OEM Specific Firmware Progress event"}else return m[c[1]]}if(18==
93 -a&&170==c[0])return"Agent watchdog "+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... changed to "+h.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case intrusion";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"A remote Serial Over LAN session was established.";if(1==c[2])return"Remote Serial Over LAN session finished. User control was restored.";if(2==c[2])return"A remote IDE-Redirection session was established.";if(3==c[2])return"Remote IDE-Redirection session finished. User control was restored."}if(36==
93 +a&&170==c[0])return"Agent watchdog "+char2hex(c[4])+char2hex(c[3])+char2hex(c[2])+char2hex(c[1])+"-"+char2hex(c[6])+char2hex(c[5])+"-... changed to "+g.WatchdogCurrentStates[c[7]];if(5==a&&0==b)return"Case intrusion";if(192==a&&0==b&&170==c[0]&&48==c[1]){if(0==c[2])return"A remote Serial Over LAN session was established.";if(1==c[2])return"Remote Serial Over LAN session finished. User control was restored.";if(2==c[2])return"A remote IDE-Redirection session was established.";if(3==c[2])return"Remote IDE-Redirection session finished. User control was restored."}if(36==
94 a)return a=(c[1]<<24)+(c[2]<<16)+(c[3]<<8)+c[4],b="#"+c[0],170==c[0]&&(b="wired"),4294967293==a?"All received packet filter was matched on "+b+" interface.":4294967292==a?"All outbound packet filter was matched on "+b+" interface.":4294967290==a?"Spoofed packet filter was matched on "+b+" interface.":"Filter "+a+" was matched on "+b+" interface.";if(192==a)return 0==c[2]?"Security policy invoked. Some or all network traffic (TX) was stopped.":2==c[2]?"Security policy invoked. Some or all network traffic (RX) was stopped.":
95 "Security policy invoked.";if(193==a){if(170==c[0]&&48==c[1]&&0==c[2]&&0==c[3])return"User request for remote connection.";if(170==c[0]&&32==c[1]&&3==c[2]&&1==c[3])return"EAC error: attempt to get posture while NAC in Intel\ufffd AMT is disabled.";if(170==c[0]&&32==c[1]&&4==c[2]&&0==c[3])return"HWA Error: general error"}return 6==a?"Authentication failed "+(c[1]+(c[2]<<8))+" times. The system may be under attack.":30==a?"No bootable media":32==a?"Operating system lockup or power interrupt":35==a?
96 -64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function q(a,b,c,p,d){if(200!=p)d[0](h,[],p);else{var C,g,k=d[1],m=new Date,e;if(0<c.Body.RecordsReturned)for(g in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[g])}catch(u){console.log(u+" "+c.Body.EventRecords[g])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,
97 -2),InitiatorType:a.charCodeAt(4)};b.AuditApp=D[b.AuditAppID];b.Event=D[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(C=a.charCodeAt(5),b.Initiator=a.substring(6,6+C),C=6+C);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),C=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+C)),C=10+C);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",C=5);3==b.InitiatorType&&(b.Initiator="<i>KVM Default Port</i>",C=5);e=ReadInt(a,C);b.Time=new Date(1E3*(e+60*m.getTimezoneOffset()));
98 -C+=4;b.MCLocationType=a.charCodeAt(C++);e=a.charCodeAt(C++);b.NetAddress=a.substring(C,C+e);C+=e;e=a.charCodeAt(C++);b.Ex=a.substring(C,C+e);b.ExStr=h.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);k.push(b)}if(c.Body.TotalRecordCount>k.length)h.AMT_AuditLog_ReadRecords(k.length+1,q,[d[0],k]);else d[0](h,k,p)}}var h={};h.wsman=b;h.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];h.PendingEnums=
99 -[];h.PendingBatchOperations=0;h.ActiveEnumsCount=0;h.MaxActiveEnumsCount=1;h.onProcessChanged=null;var B=0,w=0;h.GetPendingActions=function(){return 2*h.PendingEnums.length+h.ActiveEnumsCount+h.wsman.comm.PendingAjax.length+h.wsman.comm.ActiveAjaxCount+h.PendingBatchOperations};h.Subscribe=function(a,b,p,d,x,g,k,m,q,e){h.wsman.ExecSubscribe(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,A,z,x)},0,g,k,m,q,e);c()};h.UnSubscribe=function(a,b,p,d,x){h.wsman.ExecUnSubscribe(h.CompleteName(a),function(d,
100 -x,g,k){c();b(h,a,g,k,p)},0,d,x);c()};h.Get=function(a,b,p,d){h.wsman.ExecGet(h.CompleteName(a),function(d,g,k,m){c();b(h,a,k,m,p)},0,d);c()};h.Put=function(a,b,p,d,x,g){h.wsman.ExecPut(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x,g);c()};h.Create=function(a,b,p,d,x){h.wsman.ExecCreate(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Delete=function(a,b,p,d,x){h.wsman.ExecDelete(h.CompleteName(a),b,function(b,x,z,g){c();p(h,a,z,g,d)},0,x);c()};h.Exec=function(a,b,
101 -p,d,x,g,k){h.wsman.ExecMethod(h.CompleteName(a),b,p,function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.ExecWithXml=function(a,b,p,d,x,g,k){h.wsman.ExecMethodXml(h.CompleteName(a),b,execArgumentsToXml(p),function(b,p,A,z){c();d(h,a,h.CompleteExecResponse(A),z,x)},0,g,k);c()};h.Enum=function(b,p,d,g){h.ActiveEnumsCount<h.MaxActiveEnumsCount?(h.ActiveEnumsCount++,h.wsman.ExecEnum(h.CompleteName(b),function(d,h,A,g,k){c();a(b,A,p,h,g,k)},d,g)):h.PendingEnums.push([b,p,d,g]);c()};
102 -h.BatchEnum=function(a,b,p,d,x,g){x={_pending:b.length};h.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],q=h.Enum;"*"==m[0]&&(q=h.Get,m=m.substring(1));q(m,function(b,x,z,g,C){h.PendingBatchOperations--;c();C[2][x]={response:null==z?null:z.Body,responses:z,status:g};0==--C[2]._pending&&(delete C[2]._pending,p.call(h,h,a,C[2],g,d))},[a,b,x,q==h.Get?"Get":"Enum"],g)}};h.BatchGet=function(a,b,p,d,x){v({name:a,names:b,callback:p,current:0,responses:{},tag:d,pri:x});c()};h.CompleteName=function(a){if(0==
103 -a.indexOf("AMT_"))return h.pfx[0]+a;if(0==a.indexOf("CIM_"))return h.pfx[1]+a;if(0==a.indexOf("IPS_"))return h.pfx[2]+a};h.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=h.AmtStatusToStr(a.Body.ReturnValue));return a};h.RequestPowerStateChange=function(a,b){h.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
104 -null,null,b)};h.RequestOSPowerStateChange=function(a,b){h.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 -null,null,b)};h.SetBootConfigRole=function(a,b){h.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
106 -a,b)};h.CancelAllQueries=function(a){h.wsman.CancelAllQueries(a)};h.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,p,d,g,
107 -k,m,q){h.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g,k,m,q)};h.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,p){h.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,p)};h.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){h.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};h.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){h.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};h.AMT_AgentPresenceWatchdogVA_AssertPresence=
108 -function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};h.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,p,d,g){h.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:p,ActionEac:d},g)};h.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){h.Exec("AMT_AgentPresenceWatchdogVA",
109 -"DeleteAllActions",{_method_dummy:a},b)};h.AMT_AuditLog_ClearLog=function(a){h.Exec("AMT_AuditLog","ClearLog",{},a)};h.AMT_AuditLog_RequestStateChange=function(a,b,c){h.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_AuditLog_ReadRecords=function(a,b,c){h.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};h.AMT_AuditLog_SetAuditLock=function(a,b,c,p){h.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},p)};h.AMT_AuditLog_ExportAuditLogSignature=
110 -function(a,b){h.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};h.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,p,d){h.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,p,d){h.Exec("AMT_AuditPolicyRule",
111 -"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:p},d)};h.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,p,d,g){h.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:p,Realms:d},g)};h.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){h.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};h.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService",
112 -"GetUserAclEntryEx",{Handle:a},b,c)};h.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,p,d,g,k){h.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:p,AccessPermission:d,Realms:g},k)};h.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){h.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};h.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){h.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
113 -{Username:a,DigestPassword:b},c)};h.AMT_AuthorizationService_GetAdminAclEntry=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};h.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};h.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){h.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};h.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,p){h.Exec("AMT_AuthorizationService",
114 -"SetAclEnabledState",{Handle:a,Enabled:b},c,p)};h.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){h.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};h.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_EndpointAccessControlService_GetPosture=function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};h.AMT_EndpointAccessControlService_GetPostureHash=
115 -function(a,b){h.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};h.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){h.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};h.AMT_EndpointAccessControlService_GetEacOptions=function(a){h.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};h.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){h.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
116 -PostureHashAlgorithm:b},c)};h.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};h.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){h.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};h.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){h.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};h.AMT_GeneralSettings_AMTAuthenticate=
117 -function(a,b){h.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};h.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){h.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};h.AMT_KerberosSettingData_GetCredentialCacheState=function(a){h.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};h.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){h.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
118 -b)};h.AMT_MessageLog_CancelIteration=function(a,b){h.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};h.AMT_MessageLog_RequestStateChange=function(a,b,c){h.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_MessageLog_ClearLog=function(a){h.Exec("AMT_MessageLog","ClearLog",{},a)};h.AMT_MessageLog_GetRecords=function(a,b,c,p){h.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,p)};h.AMT_MessageLog_GetRecord=function(a,
119 -b,c){h.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};h.AMT_MessageLog_PositionAtRecord=function(a,b,c,p){h.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},p)};h.AMT_MessageLog_PositionToFirstRecord=function(a,b){h.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};h.AMT_MessageLog_FreezeLog=function(a,b){h.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};h.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){h.Exec("AMT_PublicKeyManagementService",
120 -"AddCRL",{Url:a,SerialNumbers:b},c)};h.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){h.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};h.AMT_PublicKeyManagementService_AddCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){h.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};h.AMT_PublicKeyManagementService_AddKey=
121 -function(a,b){h.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};h.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},p)};h.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,p){h.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},p)};h.AMT_PublicKeyManagementService_GenerateKeyPair=
122 -function(a,b,c){h.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};h.AMT_RedirectionService_RequestStateChange=function(a,b){h.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};h.AMT_RedirectionService_TerminateSession=function(a,b){h.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};h.AMT_RemoteAccessService_AddMpServer=function(a,b,c,p,d,g,k,m,q){h.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
123 -Port:c,AuthMethod:p,Certificate:d,Username:g,Password:k,CN:m},q)};h.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,p,d,g){h.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:p,InternalMpServer:d},g)};h.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){h.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){h.Exec("AMT_SetupAndConfigurationService",
124 -"CommitChanges",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_Unprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};h.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){h.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};h.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
125 -h.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){h.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};h.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){h.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};h.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){h.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){h.Exec("AMT_SetupAndConfigurationService",
126 -"GetProvisioningAuditRecord",{},a)};h.AMT_SetupAndConfigurationService_GetUuid=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};h.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){h.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};h.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){h.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};h.AMT_SystemDefensePolicy_GetTimeout=
127 -function(a){h.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};h.AMT_SystemDefensePolicy_SetTimeout=function(a,b){h.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};h.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,p,d,g){h.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,p,d,g)};h.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){h.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};h.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
128 -function(a,b){h.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};h.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,p,d){h.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},p,d)};h.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){h.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WebUIService_RequestStateChange=function(a,b,c){h.Exec("AMT_WebUIService",
129 -"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,p,d,g){h.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
130 -IEEE8021xSettingsInput:c,ClientCredential:p,CACredential:d},g)};h.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};h.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){h.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};h.CIM_Account_RequestStateChange=function(a,b,c){h.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
131 -c)};h.CIM_AccountManagementService_CreateAccount=function(a,b,c){h.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};h.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){h.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};h.CIM_BootService_SetBootConfigRole=function(a,b,c){h.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};h.CIM_BootService_RequestStateChange=function(a,b,c,p){h.Exec("CIM_BootService","RequestStateChange",
132 -{RequestedState:a,TimeoutPeriod:b},c,p,1)};h.CIM_Card_ConnectorPower=function(a,b,c){h.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};h.CIM_Card_IsCompatible=function(a,b){h.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};h.CIM_Chassis_IsCompatible=function(a,b){h.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};h.CIM_Fan_SetSpeed=function(a,b){h.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};h.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){h.Exec("CIM_KVMRedirectionSAP",
133 -"RequestStateChange",{RequestedState:a},c)};h.CIM_MediaAccessDevice_LockMedia=function(a,b){h.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};h.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){h.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_MediaAccessDevice_Reset=function(a){h.Exec("CIM_MediaAccessDevice","Reset",{},a)};h.CIM_MediaAccessDevice_EnableDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};h.CIM_MediaAccessDevice_OnlineDevice=
134 -function(a,b){h.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};h.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){h.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};h.CIM_MediaAccessDevice_SaveProperties=function(a){h.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};h.CIM_MediaAccessDevice_RestoreProperties=function(a){h.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};h.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){h.Exec("CIM_MediaAccessDevice","RequestStateChange",
135 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_PhysicalFrame_IsCompatible=function(a,b){h.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};h.CIM_PhysicalPackage_IsCompatible=function(a,b){h.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};h.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,p,d){h.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.CIM_PowerSupply_SetPowerState=function(a,
136 -b,c){h.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_PowerSupply_Reset=function(a){h.Exec("CIM_PowerSupply","Reset",{},a)};h.CIM_PowerSupply_EnableDevice=function(a,b){h.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};h.CIM_PowerSupply_OnlineDevice=function(a,b){h.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};h.CIM_PowerSupply_QuiesceDevice=function(a,b){h.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};h.CIM_PowerSupply_SaveProperties=function(a){h.Exec("CIM_PowerSupply",
137 -"SaveProperties",{},a)};h.CIM_PowerSupply_RestoreProperties=function(a){h.Exec("CIM_PowerSupply","RestoreProperties",{},a)};h.CIM_PowerSupply_RequestStateChange=function(a,b,c){h.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Processor_SetPowerState=function(a,b,c){h.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Processor_Reset=function(a){h.Exec("CIM_Processor","Reset",{},a)};h.CIM_Processor_EnableDevice=function(a,b){h.Exec("CIM_Processor",
138 -"EnableDevice",{Enabled:a},b)};h.CIM_Processor_OnlineDevice=function(a,b){h.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};h.CIM_Processor_QuiesceDevice=function(a,b){h.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Processor_SaveProperties=function(a){h.Exec("CIM_Processor","SaveProperties",{},a)};h.CIM_Processor_RestoreProperties=function(a){h.Exec("CIM_Processor","RestoreProperties",{},a)};h.CIM_Processor_RequestStateChange=function(a,b,c){h.Exec("CIM_Processor","RequestStateChange",
139 -{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RecordLog_ClearLog=function(a){h.Exec("CIM_RecordLog","ClearLog",{},a)};h.CIM_RecordLog_RequestStateChange=function(a,b,c){h.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_RedirectionService_RequestStateChange=function(a,b,c){h.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_Sensor_SetPowerState=function(a,b,c){h.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
140 -c)};h.CIM_Sensor_Reset=function(a){h.Exec("CIM_Sensor","Reset",{},a)};h.CIM_Sensor_EnableDevice=function(a,b){h.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};h.CIM_Sensor_OnlineDevice=function(a,b){h.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};h.CIM_Sensor_QuiesceDevice=function(a,b){h.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};h.CIM_Sensor_SaveProperties=function(a){h.Exec("CIM_Sensor","SaveProperties",{},a)};h.CIM_Sensor_RestoreProperties=function(a){h.Exec("CIM_Sensor","RestoreProperties",
141 -{},a)};h.CIM_Sensor_RequestStateChange=function(a,b,c){h.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_StatisticalData_ResetSelectedStats=function(a,b){h.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};h.CIM_Watchdog_KeepAlive=function(a){h.Exec("CIM_Watchdog","KeepAlive",{},a)};h.CIM_Watchdog_SetPowerState=function(a,b,c){h.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_Watchdog_Reset=function(a){h.Exec("CIM_Watchdog",
142 -"Reset",{},a)};h.CIM_Watchdog_EnableDevice=function(a,b){h.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};h.CIM_Watchdog_OnlineDevice=function(a,b){h.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};h.CIM_Watchdog_QuiesceDevice=function(a,b){h.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};h.CIM_Watchdog_SaveProperties=function(a){h.Exec("CIM_Watchdog","SaveProperties",{},a)};h.CIM_Watchdog_RestoreProperties=function(a){h.Exec("CIM_Watchdog","RestoreProperties",{},a)};h.CIM_Watchdog_RequestStateChange=
143 -function(a,b,c){h.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.CIM_WiFiPort_SetPowerState=function(a,b,c){h.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};h.CIM_WiFiPort_Reset=function(a){h.Exec("CIM_WiFiPort","Reset",{},a)};h.CIM_WiFiPort_EnableDevice=function(a,b){h.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};h.CIM_WiFiPort_OnlineDevice=function(a,b){h.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};h.CIM_WiFiPort_QuiesceDevice=function(a,
144 -b){h.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};h.CIM_WiFiPort_SaveProperties=function(a){h.Exec("CIM_WiFiPort","SaveProperties",{},a)};h.CIM_WiFiPort_RestoreProperties=function(a){h.Exec("CIM_WiFiPort","RestoreProperties",{},a)};h.CIM_WiFiPort_RequestStateChange=function(a,b,c){h.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_HostBasedSetupService_Setup=function(a,b,c,p,d,g,k){h.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
145 -NetworkAdminPassword:b,McNonce:c,Certificate:p,SigningAlgorithm:d,DigitalSignature:g},k)};h.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},p)};h.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,p,d,g){h.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:p,DigitalSignature:d},g)};h.IPS_HostBasedSetupService_UpgradeClientToAdmin=
146 -function(a,b,c,p){h.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},p)};h.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){h.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};h.IPS_KVMRedirectionSettingData_TerminateSession=function(a){h.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){h.Exec("IPS_KVMRedirectionSettingData",
147 -"DataChannelRead",{},a)};h.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){h.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};h.IPS_OptInService_StartOptIn=function(a){h.Exec("IPS_OptInService","StartOptIn",{},a)};h.IPS_OptInService_CancelOptIn=function(a){h.Exec("IPS_OptInService","CancelOptIn",{},a)};h.IPS_OptInService_SendOptInCode=function(a,b){h.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};h.IPS_OptInService_StartService=function(a){h.Exec("IPS_OptInService",
148 -"StartService",{},a)};h.IPS_OptInService_StopService=function(a){h.Exec("IPS_OptInService","StopService",{},a)};h.IPS_OptInService_RequestStateChange=function(a,b,c){h.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,p,d){h.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:p},d,0,1)};h.IPS_ProvisioningRecordLog_RequestStateChange=
149 -function(a,b,c){h.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};h.IPS_ProvisioningRecordLog_ClearLog=function(a,b){h.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};h.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){h.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};h.IPS_SecIOService_RequestStateChange=function(a,b,c){h.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
150 -TimeoutPeriod:b},c)};h.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,p,d){h.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:p},d)};h.AmtStatusToStr=function(a){return h.AmtStatusCodes[a]?h.AmtStatusCodes[a]:"UNKNOWN_ERROR"};h.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
96 +64==c[0]?"BIOS POST (Power On Self-Test) Watchdog Timeout.":"System boot failure":37==a?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+a}function p(a,b,c,q,d){if(200!=q)d[0](g,[],q);else{var h,k,m=d[1],e=new Date,u;if(0<c.Body.RecordsReturned)for(k in c.Body.EventRecords=MakeToArray(c.Body.EventRecords),c.Body.EventRecords){a=null;try{a=window.atob(c.Body.EventRecords[k])}catch(w){console.log(w+" "+c.Body.EventRecords[k])}b={AuditAppID:ReadShort(a,0),EventID:ReadShort(a,
97 +2),InitiatorType:a.charCodeAt(4)};b.AuditApp=C[b.AuditAppID];b.Event=C[100*b.AuditAppID+b.EventID];b.Event||(b.Event="#"+b.EventID);0==b.InitiatorType&&(h=a.charCodeAt(5),b.Initiator=a.substring(6,6+h),h=6+h);1==b.InitiatorType&&(b.KerberosUserInDomain=ReadInt(a,5),h=a.charCodeAt(9),b.Initiator=GetSidString(a.substring(10,10+h)),h=10+h);2==b.InitiatorType&&(b.Initiator="<i>Local</i>",h=5);3==b.InitiatorType&&(b.Initiator="<i>KVM Default Port</i>",h=5);u=ReadInt(a,h);b.Time=new Date(1E3*(u+60*e.getTimezoneOffset()));
98 +h+=4;b.MCLocationType=a.charCodeAt(h++);u=a.charCodeAt(h++);b.NetAddress=a.substring(h,h+u);h+=u;u=a.charCodeAt(h++);b.Ex=a.substring(h,h+u);b.ExStr=g.GetAuditLogExtendedDataStr(100*b.AuditAppID+b.EventID,b.Ex);m.push(b)}if(c.Body.TotalRecordCount>m.length)g.AMT_AuditLog_ReadRecords(m.length+1,p,[d[0],m]);else d[0](g,m,q)}}var g={};g.wsman=b;g.pfx=["http://intel.com/wbem/wscim/1/amt-schema/1/","http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/","http://intel.com/wbem/wscim/1/ips-schema/1/"];g.PendingEnums=
99 +[];g.PendingBatchOperations=0;g.ActiveEnumsCount=0;g.MaxActiveEnumsCount=1;g.onProcessChanged=null;var B=0,w=0;g.GetPendingActions=function(){return 2*g.PendingEnums.length+g.ActiveEnumsCount+g.wsman.comm.PendingAjax.length+g.wsman.comm.ActiveAjaxCount+g.PendingBatchOperations};g.Subscribe=function(a,b,q,d,y,h,k,m,p,e){g.wsman.ExecSubscribe(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,A,z,y)},0,h,k,m,p,e);c()};g.UnSubscribe=function(a,b,q,d,y){g.wsman.ExecUnSubscribe(g.CompleteName(a),function(d,
100 +y,h,k){c();b(g,a,h,k,q)},0,d,y);c()};g.Get=function(a,b,q,d){g.wsman.ExecGet(g.CompleteName(a),function(d,h,k,m){c();b(g,a,k,m,q)},0,d);c()};g.Put=function(a,b,q,d,y,h){g.wsman.ExecPut(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y,h);c()};g.Create=function(a,b,q,d,y){g.wsman.ExecCreate(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Delete=function(a,b,q,d,y){g.wsman.ExecDelete(g.CompleteName(a),b,function(b,y,z,h){c();q(g,a,z,h,d)},0,y);c()};g.Exec=function(a,b,
101 +q,d,y,h,k){g.wsman.ExecMethod(g.CompleteName(a),b,q,function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.ExecWithXml=function(a,b,q,d,y,h,k){g.wsman.ExecMethodXml(g.CompleteName(a),b,execArgumentsToXml(q),function(b,q,A,z){c();d(g,a,g.CompleteExecResponse(A),z,y)},0,h,k);c()};g.Enum=function(b,q,d,h){g.ActiveEnumsCount<g.MaxActiveEnumsCount?(g.ActiveEnumsCount++,g.wsman.ExecEnum(g.CompleteName(b),function(d,g,A,h,k){c();a(b,A,q,g,h,k)},d,h)):g.PendingEnums.push([b,q,d,h]);c()};
102 +g.BatchEnum=function(a,b,q,d,y,h){y={_pending:b.length};g.PendingBatchOperations+=b.length;for(var k in b){var m=b[k],p=g.Enum;"*"==m[0]&&(p=g.Get,m=m.substring(1));p(m,function(b,y,z,h,k){g.PendingBatchOperations--;c();k[2][y]={response:null==z?null:z.Body,responses:z,status:h};0==--k[2]._pending&&(delete k[2]._pending,q.call(g,g,a,k[2],h,d))},[a,b,y,p==g.Get?"Get":"Enum"],h)}};g.BatchGet=function(a,b,q,d,y){v({name:a,names:b,callback:q,current:0,responses:{},tag:d,pri:y});c()};g.CompleteName=function(a){if(0==
103 +a.indexOf("AMT_"))return g.pfx[0]+a;if(0==a.indexOf("CIM_"))return g.pfx[1]+a;if(0==a.indexOf("IPS_"))return g.pfx[2]+a};g.CompleteExecResponse=function(a){a&&null!=a&&a.Body&&void 0!=a.Body.ReturnValue&&(a.Body.ReturnValueStr=g.AmtStatusToStr(a.Body.ReturnValue));return a};g.RequestPowerStateChange=function(a,b){g.CIM_PowerManagementService_RequestPowerStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
104 +null,null,b)};g.RequestOSPowerStateChange=function(a,b){g.IPS_PowerManagementService_RequestOSPowerSavingStateChange(a,'<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="CreationClassName">CIM_ComputerSystem</Selector><Selector Name="Name">ManagedSystem</Selector></SelectorSet></ReferenceParameters>',
105 +null,null,b)};g.SetBootConfigRole=function(a,b){g.CIM_BootService_SetBootConfigRole('<Address xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing</Address><ReferenceParameters xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing"><ResourceURI xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSetting</ResourceURI><SelectorSet xmlns="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"><Selector Name="InstanceID">Intel(r) AMT: Boot Configuration 0</Selector></SelectorSet></ReferenceParameters>',
106 +a,b)};g.CancelAllQueries=function(a){g.wsman.CancelAllQueries(a)};g.AMT_AgentPresenceWatchdog_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdog_AssertPresence=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdog_AddAction=function(a,b,c,q,d,h,
107 +k,m,p){g.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h,k,m,p)};g.AMT_AgentPresenceWatchdog_DeleteAllActions=function(a,b,c,q){g.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},a,b,c,q)};g.AMT_AgentPresenceWatchdogAction_GetActionEac=function(a){g.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},a)};g.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(a){g.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},a)};g.AMT_AgentPresenceWatchdogVA_AssertPresence=
108 +function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:a},b)};g.AMT_AgentPresenceWatchdogVA_AddAction=function(a,b,c,q,d,h){g.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:a,NewState:b,EventOnTransition:c,ActionSd:q,ActionEac:d},h)};g.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(a,b){g.Exec("AMT_AgentPresenceWatchdogVA",
109 +"DeleteAllActions",{_method_dummy:a},b)};g.AMT_AuditLog_ClearLog=function(a){g.Exec("AMT_AuditLog","ClearLog",{},a)};g.AMT_AuditLog_RequestStateChange=function(a,b,c){g.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_AuditLog_ReadRecords=function(a,b,c){g.Exec("AMT_AuditLog","ReadRecords",{StartIndex:a},b,c)};g.AMT_AuditLog_SetAuditLock=function(a,b,c,q){g.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:a,Flag:b,Handle:c},q)};g.AMT_AuditLog_ExportAuditLogSignature=
110 +function(a,b){g.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:a},b)};g.AMT_AuditLog_SetSigningKeyMaterial=function(a,b,c,q,d){g.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:a,SigningKey:b,LengthOfCertificates:c,Certificates:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicy=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(a,b,c,q,d){g.Exec("AMT_AuditPolicyRule",
111 +"SetAuditPolicyBulk",{Enable:a,AuditedAppID:b,EventID:c,PolicyType:q},d)};g.AMT_AuthorizationService_AddUserAclEntryEx=function(a,b,c,q,d,h){g.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:a,DigestPassword:b,KerberosUserSid:c,AccessPermission:q,Realms:d},h)};g.AMT_AuthorizationService_EnumerateUserAclEntries=function(a,b){g.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:a},b)};g.AMT_AuthorizationService_GetUserAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService",
112 +"GetUserAclEntryEx",{Handle:a},b,c)};g.AMT_AuthorizationService_UpdateUserAclEntryEx=function(a,b,c,q,d,h,k){g.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:a,DigestUsername:b,DigestPassword:c,KerberosUserSid:q,AccessPermission:d,Realms:h},k)};g.AMT_AuthorizationService_RemoveUserAclEntry=function(a,b){g.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:a},b)};g.AMT_AuthorizationService_SetAdminAclEntryEx=function(a,b,c){g.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",
113 +{Username:a,DigestPassword:b},c)};g.AMT_AuthorizationService_GetAdminAclEntry=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},a)};g.AMT_AuthorizationService_GetAdminAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},a)};g.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(a){g.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},a)};g.AMT_AuthorizationService_SetAclEnabledState=function(a,b,c,q){g.Exec("AMT_AuthorizationService",
114 +"SetAclEnabledState",{Handle:a,Enabled:b},c,q)};g.AMT_AuthorizationService_GetAclEnabledState=function(a,b,c){g.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:a},b,c)};g.AMT_EndpointAccessControlService_RequestStateChange=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_EndpointAccessControlService_GetPosture=function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:a},b)};g.AMT_EndpointAccessControlService_GetPostureHash=
115 +function(a,b){g.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:a},b)};g.AMT_EndpointAccessControlService_UpdatePostureState=function(a,b){g.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:a},b)};g.AMT_EndpointAccessControlService_GetEacOptions=function(a){g.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},a)};g.AMT_EndpointAccessControlService_SetEacOptions=function(a,b,c){g.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:a,
116 +PostureHashAlgorithm:b},c)};g.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:a},b)};g.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(a,b){g.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:a},b)};g.AMT_EthernetPortSettings_SetLinkPreference=function(a,b,c){g.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:a,Timeout:b},c)};g.AMT_GeneralSettings_AMTAuthenticate=
117 +function(a,b){g.Exec("AMT_GeneralSettings","AMTAuthenticate",{MC_Nonce:a},b)};g.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(a,b){g.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:a},b)};g.AMT_KerberosSettingData_GetCredentialCacheState=function(a){g.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},a)};g.AMT_KerberosSettingData_SetCredentialCacheState=function(a,b){g.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:a},
118 +b)};g.AMT_MessageLog_CancelIteration=function(a,b){g.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:a},b)};g.AMT_MessageLog_RequestStateChange=function(a,b,c){g.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_MessageLog_ClearLog=function(a){g.Exec("AMT_MessageLog","ClearLog",{},a)};g.AMT_MessageLog_GetRecords=function(a,b,c,q){g.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:a,MaxReadRecords:b},c,q)};g.AMT_MessageLog_GetRecord=function(a,
119 +b,c){g.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:a,PositionToNext:b},c)};g.AMT_MessageLog_PositionAtRecord=function(a,b,c,q){g.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:a,MoveAbsolute:b,RecordNumber:c},q)};g.AMT_MessageLog_PositionToFirstRecord=function(a,b){g.Exec("AMT_MessageLog","PositionToFirstRecord",{},a,b)};g.AMT_MessageLog_FreezeLog=function(a,b){g.Exec("AMT_MessageLog","FreezeLog",{Freeze:a},b)};g.AMT_PublicKeyManagementService_AddCRL=function(a,b,c){g.Exec("AMT_PublicKeyManagementService",
120 +"AddCRL",{Url:a,SerialNumbers:b},c)};g.AMT_PublicKeyManagementService_ResetCRLList=function(a,b){g.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:a},b)};g.AMT_PublicKeyManagementService_AddCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(a,b){g.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:a},b)};g.AMT_PublicKeyManagementService_AddKey=
121 +function(a,b){g.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:a},b)};g.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:a,DNName:b,Usage:c},q)};g.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(a,b,c,q){g.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:a,SigningAlgorithm:b,NullSignedCertificateRequest:c},q)};g.AMT_PublicKeyManagementService_GenerateKeyPair=
122 +function(a,b,c){g.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:a,KeyLength:b},c)};g.AMT_RedirectionService_RequestStateChange=function(a,b){g.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:a},b)};g.AMT_RedirectionService_TerminateSession=function(a,b){g.Exec("AMT_RedirectionService","TerminateSession",{SessionType:a},b)};g.AMT_RemoteAccessService_AddMpServer=function(a,b,c,q,d,h,k,m,p){g.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:a,InfoFormat:b,
123 +Port:c,AuthMethod:q,Certificate:d,Username:h,Password:k,CN:m},p)};g.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(a,b,c,q,d,h){g.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:a,TunnelLifeTime:b,ExtendedData:c,MpServer:q,InternalMpServer:d},h)};g.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(a,b){g.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_CommitChanges=function(a,b){g.Exec("AMT_SetupAndConfigurationService",
124 +"CommitChanges",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_Unprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:a},b)};g.AMT_SetupAndConfigurationService_PartialUnprovision=function(a,b){g.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:a},b)};g.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:a},b)};
125 +g.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(a,b){g.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:a},b)};g.AMT_SetupAndConfigurationService_SetMEBxPassword=function(a,b){g.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:a},b)};g.AMT_SetupAndConfigurationService_SetTLSPSK=function(a,b,c){g.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:a,PPS:b},c)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(a){g.Exec("AMT_SetupAndConfigurationService",
126 +"GetProvisioningAuditRecord",{},a)};g.AMT_SetupAndConfigurationService_GetUuid=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUuid",{},a)};g.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(a){g.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},a)};g.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(a){g.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},a)};g.AMT_SystemDefensePolicy_GetTimeout=
127 +function(a){g.Exec("AMT_SystemDefensePolicy","GetTimeout",{},a)};g.AMT_SystemDefensePolicy_SetTimeout=function(a,b){g.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:a},b)};g.AMT_SystemDefensePolicy_UpdateStatistics=function(a,b,c,q,d,h){g.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:a,ResetOnRead:b},c,q,d,h)};g.AMT_SystemPowerScheme_SetPowerScheme=function(a,b,c){g.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},a,c,0,{InstanceID:b})};g.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=
128 +function(a,b){g.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},a,b)};g.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(a,b,c,q,d){g.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:a,Tm1:b,Tm2:c},q,d)};g.AMT_UserInitiatedConnectionService_RequestStateChange=function(a,b,c){g.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WebUIService_RequestStateChange=function(a,b,c){g.Exec("AMT_WebUIService",
129 +"RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:a,WiFiEndpointSettingsInput:b,IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(a,b,c,q,d,h){g.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:a,WiFiEndpointSettingsInput:b,
130 +IEEE8021xSettingsInput:c,ClientCredential:q,CACredential:d},h)};g.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:a},b)};g.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(a,b){g.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:a},b)};g.CIM_Account_RequestStateChange=function(a,b,c){g.Exec("CIM_Account","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},
131 +c)};g.CIM_AccountManagementService_CreateAccount=function(a,b,c){g.Exec("CIM_AccountManagementService","CreateAccount",{System:a,AccountTemplate:b},c)};g.CIM_BootConfigSetting_ChangeBootOrder=function(a,b){g.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:a},b)};g.CIM_BootService_SetBootConfigRole=function(a,b,c){g.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:a,Role:b},c,0,1)};g.CIM_BootService_RequestStateChange=function(a,b,c,q){g.Exec("CIM_BootService","RequestStateChange",
132 +{RequestedState:a,TimeoutPeriod:b},c,q,1)};g.CIM_Card_ConnectorPower=function(a,b,c){g.Exec("CIM_Card","ConnectorPower",{Connector:a,PoweredOn:b},c)};g.CIM_Card_IsCompatible=function(a,b){g.Exec("CIM_Card","IsCompatible",{ElementToCheck:a},b)};g.CIM_Chassis_IsCompatible=function(a,b){g.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:a},b)};g.CIM_Fan_SetSpeed=function(a,b){g.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:a},b)};g.CIM_KVMRedirectionSAP_RequestStateChange=function(a,b,c){g.Exec("CIM_KVMRedirectionSAP",
133 +"RequestStateChange",{RequestedState:a},c)};g.CIM_MediaAccessDevice_LockMedia=function(a,b){g.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:a},b)};g.CIM_MediaAccessDevice_SetPowerState=function(a,b,c){g.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_MediaAccessDevice_Reset=function(a){g.Exec("CIM_MediaAccessDevice","Reset",{},a)};g.CIM_MediaAccessDevice_EnableDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:a},b)};g.CIM_MediaAccessDevice_OnlineDevice=
134 +function(a,b){g.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:a},b)};g.CIM_MediaAccessDevice_QuiesceDevice=function(a,b){g.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:a},b)};g.CIM_MediaAccessDevice_SaveProperties=function(a){g.Exec("CIM_MediaAccessDevice","SaveProperties",{},a)};g.CIM_MediaAccessDevice_RestoreProperties=function(a){g.Exec("CIM_MediaAccessDevice","RestoreProperties",{},a)};g.CIM_MediaAccessDevice_RequestStateChange=function(a,b,c){g.Exec("CIM_MediaAccessDevice","RequestStateChange",
135 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_PhysicalFrame_IsCompatible=function(a,b){g.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:a},b)};g.CIM_PhysicalPackage_IsCompatible=function(a,b){g.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:a},b)};g.CIM_PowerManagementService_RequestPowerStateChange=function(a,b,c,q,d){g.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.CIM_PowerSupply_SetPowerState=function(a,
136 +b,c){g.Exec("CIM_PowerSupply","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_PowerSupply_Reset=function(a){g.Exec("CIM_PowerSupply","Reset",{},a)};g.CIM_PowerSupply_EnableDevice=function(a,b){g.Exec("CIM_PowerSupply","EnableDevice",{Enabled:a},b)};g.CIM_PowerSupply_OnlineDevice=function(a,b){g.Exec("CIM_PowerSupply","OnlineDevice",{Online:a},b)};g.CIM_PowerSupply_QuiesceDevice=function(a,b){g.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:a},b)};g.CIM_PowerSupply_SaveProperties=function(a){g.Exec("CIM_PowerSupply",
137 +"SaveProperties",{},a)};g.CIM_PowerSupply_RestoreProperties=function(a){g.Exec("CIM_PowerSupply","RestoreProperties",{},a)};g.CIM_PowerSupply_RequestStateChange=function(a,b,c){g.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Processor_SetPowerState=function(a,b,c){g.Exec("CIM_Processor","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Processor_Reset=function(a){g.Exec("CIM_Processor","Reset",{},a)};g.CIM_Processor_EnableDevice=function(a,b){g.Exec("CIM_Processor",
138 +"EnableDevice",{Enabled:a},b)};g.CIM_Processor_OnlineDevice=function(a,b){g.Exec("CIM_Processor","OnlineDevice",{Online:a},b)};g.CIM_Processor_QuiesceDevice=function(a,b){g.Exec("CIM_Processor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Processor_SaveProperties=function(a){g.Exec("CIM_Processor","SaveProperties",{},a)};g.CIM_Processor_RestoreProperties=function(a){g.Exec("CIM_Processor","RestoreProperties",{},a)};g.CIM_Processor_RequestStateChange=function(a,b,c){g.Exec("CIM_Processor","RequestStateChange",
139 +{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RecordLog_ClearLog=function(a){g.Exec("CIM_RecordLog","ClearLog",{},a)};g.CIM_RecordLog_RequestStateChange=function(a,b,c){g.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_RedirectionService_RequestStateChange=function(a,b,c){g.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_Sensor_SetPowerState=function(a,b,c){g.Exec("CIM_Sensor","SetPowerState",{PowerState:a,Time:b},
140 +c)};g.CIM_Sensor_Reset=function(a){g.Exec("CIM_Sensor","Reset",{},a)};g.CIM_Sensor_EnableDevice=function(a,b){g.Exec("CIM_Sensor","EnableDevice",{Enabled:a},b)};g.CIM_Sensor_OnlineDevice=function(a,b){g.Exec("CIM_Sensor","OnlineDevice",{Online:a},b)};g.CIM_Sensor_QuiesceDevice=function(a,b){g.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:a},b)};g.CIM_Sensor_SaveProperties=function(a){g.Exec("CIM_Sensor","SaveProperties",{},a)};g.CIM_Sensor_RestoreProperties=function(a){g.Exec("CIM_Sensor","RestoreProperties",
141 +{},a)};g.CIM_Sensor_RequestStateChange=function(a,b,c){g.Exec("CIM_Sensor","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_StatisticalData_ResetSelectedStats=function(a,b){g.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:a},b)};g.CIM_Watchdog_KeepAlive=function(a){g.Exec("CIM_Watchdog","KeepAlive",{},a)};g.CIM_Watchdog_SetPowerState=function(a,b,c){g.Exec("CIM_Watchdog","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_Watchdog_Reset=function(a){g.Exec("CIM_Watchdog",
142 +"Reset",{},a)};g.CIM_Watchdog_EnableDevice=function(a,b){g.Exec("CIM_Watchdog","EnableDevice",{Enabled:a},b)};g.CIM_Watchdog_OnlineDevice=function(a,b){g.Exec("CIM_Watchdog","OnlineDevice",{Online:a},b)};g.CIM_Watchdog_QuiesceDevice=function(a,b){g.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:a},b)};g.CIM_Watchdog_SaveProperties=function(a){g.Exec("CIM_Watchdog","SaveProperties",{},a)};g.CIM_Watchdog_RestoreProperties=function(a){g.Exec("CIM_Watchdog","RestoreProperties",{},a)};g.CIM_Watchdog_RequestStateChange=
143 +function(a,b,c){g.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.CIM_WiFiPort_SetPowerState=function(a,b,c){g.Exec("CIM_WiFiPort","SetPowerState",{PowerState:a,Time:b},c)};g.CIM_WiFiPort_Reset=function(a){g.Exec("CIM_WiFiPort","Reset",{},a)};g.CIM_WiFiPort_EnableDevice=function(a,b){g.Exec("CIM_WiFiPort","EnableDevice",{Enabled:a},b)};g.CIM_WiFiPort_OnlineDevice=function(a,b){g.Exec("CIM_WiFiPort","OnlineDevice",{Online:a},b)};g.CIM_WiFiPort_QuiesceDevice=function(a,
144 +b){g.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:a},b)};g.CIM_WiFiPort_SaveProperties=function(a){g.Exec("CIM_WiFiPort","SaveProperties",{},a)};g.CIM_WiFiPort_RestoreProperties=function(a){g.Exec("CIM_WiFiPort","RestoreProperties",{},a)};g.CIM_WiFiPort_RequestStateChange=function(a,b,c){g.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_HostBasedSetupService_Setup=function(a,b,c,q,d,h,k){g.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:a,
145 +NetworkAdminPassword:b,McNonce:c,Certificate:q,SigningAlgorithm:d,DigitalSignature:h},k)};g.IPS_HostBasedSetupService_AddNextCertInChain=function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:a,IsLeafCertificate:b,IsRootCertificate:c},q)};g.IPS_HostBasedSetupService_AdminSetup=function(a,b,c,q,d,h){g.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:a,NetworkAdminPassword:b,McNonce:c,SigningAlgorithm:q,DigitalSignature:d},h)};g.IPS_HostBasedSetupService_UpgradeClientToAdmin=
146 +function(a,b,c,q){g.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:a,SigningAlgorithm:b,DigitalSignature:c},q)};g.IPS_HostBasedSetupService_DisableClientControlMode=function(a,b){g.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:a},b)};g.IPS_KVMRedirectionSettingData_TerminateSession=function(a){g.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelRead=function(a){g.Exec("IPS_KVMRedirectionSettingData",
147 +"DataChannelRead",{},a)};g.IPS_KVMRedirectionSettingData_DataChannelWrite=function(a,b){g.Exec("IPS_KVMRedirectionSettingData","DataChannelWrite",{DataMessage:a},b)};g.IPS_OptInService_StartOptIn=function(a){g.Exec("IPS_OptInService","StartOptIn",{},a)};g.IPS_OptInService_CancelOptIn=function(a){g.Exec("IPS_OptInService","CancelOptIn",{},a)};g.IPS_OptInService_SendOptInCode=function(a,b){g.Exec("IPS_OptInService","SendOptInCode",{OptInCode:a},b)};g.IPS_OptInService_StartService=function(a){g.Exec("IPS_OptInService",
148 +"StartService",{},a)};g.IPS_OptInService_StopService=function(a){g.Exec("IPS_OptInService","StopService",{},a)};g.IPS_OptInService_RequestStateChange=function(a,b,c){g.Exec("IPS_OptInService","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_PowerManagementService_RequestOSPowerSavingStateChange=function(a,b,c,q,d){g.Exec("IPS_PowerManagementService","RequestOSPowerSavingStateChange",{OSPowerSavingState:a,ManagedElement:b,Time:c,TimeoutPeriod:q},d,0,1)};g.IPS_ProvisioningRecordLog_RequestStateChange=
149 +function(a,b,c){g.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:a,TimeoutPeriod:b},c)};g.IPS_ProvisioningRecordLog_ClearLog=function(a,b){g.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:a},b)};g.IPS_ScreenConfigurationService_SetSessionState=function(a,b,c){g.Exec("IPS_ScreenConfigurationService","SetSessionState",{SessionState:a,ConsecutiveRebootsNum:b},c)};g.IPS_SecIOService_RequestStateChange=function(a,b,c){g.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:a,
150 +TimeoutPeriod:b},c)};g.IPS_HTTPProxyService_AddProxyAccessPoint=function(a,b,c,q,d){g.Exec("IPS_HTTPProxyService","AddProxyAccessPoint",{AccessInfo:a,InfoFormat:b,Port:c,NetworkDnsSuffix:q},d)};g.AmtStatusToStr=function(a){return g.AmtStatusCodes[a]?g.AmtStatusCodes[a]:"UNKNOWN_ERROR"};g.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",
151 9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",
152 30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",
153 1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",
154 -2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};h.GetMessageLog=function(a,b){h.AMT_MessageLog_PositionToFirstRecord(n,
155 -[a,b,[]])};var E="Unspecified.;No system memory is physically installed in the system.;No usable system memory, all installed memory has experienced an unrecoverable failure.;Unrecoverable hard-disk/ATAPI/IDE device failure.;Unrecoverable system-board failure.;Unrecoverable diskette subsystem failure.;Unrecoverable hard-disk controller failure.;Unrecoverable PS/2 or USB keyboard failure.;Removable boot media not found.;Unrecoverable video controller failure.;No video device detected.;Firmware (BIOS) ROM corruption detected.;CPU voltage mismatch (processors that share same supply have mismatched voltage requirements);CPU speed matching failure".split(";"),
156 -m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;User-initiated system setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
154 +2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"};g.GetMessageLog=function(a,b){g.AMT_MessageLog_PositionToFirstRecord(n,
155 +[a,b,[]])};var D="Unspecified.;No system memory is physically installed in the system.;No usable system memory, all installed memory has experienced an unrecoverable failure.;Unrecoverable hard-disk/ATAPI/IDE device failure.;Unrecoverable system-board failure.;Unrecoverable diskette subsystem failure.;Unrecoverable hard-disk controller failure.;Unrecoverable PS/2 or USB keyboard failure.;Removable boot media not found.;Unrecoverable video controller failure.;No video device detected.;Firmware (BIOS) ROM corruption detected.;CPU voltage mismatch (processors that share same supply have mismatched voltage requirements);CPU speed matching failure".split(";"),
156 +m="Unspecified.;Memory initialization.;Starting hard-disk initialization and test;Secondary processor(s) initialization;User authentication;Entering BIOS setup;USB resource configuration;PCI resource configuration;Option ROM initialization;Video initialization;Cache initialization;SM Bus initialization;Keyboard controller initialization;Embedded controller/management controller initialization;Docking station attachment;Enabling docking station;Docking station ejection;Disabling docking station;Calling operating system wake-up vector;Starting operating system boot process;Baseboard or motherboard initialization;reserved;Floppy initialization;Keyboard test;Pointing device test;Primary processor initialization".split(";"),
157 k="Unspecified;Other;Unknown;Processor;Disk;Peripheral;System management module;System board;Memory module;Processor module;Power supply;Add in card;Front panel board;Back panel board;Power system board;Drive backplane;System internal expansion board;Other system board;Processor board;Power unit;Power module;Power management board;Chassis back panel board;System chassis;Sub chassis;Other chassis board;Disk drive bay;Peripheral bay;Device bay;Fan cooling;Cooling unit;Cable interconnect;Memory device;System management software;BIOS;Intel(r) ME;System bus;Group;Intel(r) ME;External environment;Battery;Processing blade;Connectivity switch;Processor/memory module;I/O module;Processor I/O module;Management controller firmware;IPMI channel;PCI bus;PCI express bus;SCSI bus;SATA/SAS bus;Processor front side bus".split(";");
158 -h.RealmNames=";;Redirection;;Hardware Asset;Remote Control;Storage;Event Manager;Storage Admin;Agent Presence Local;Agent Presence Remote;Circuit Breaker;Network Time;General Information;Firmware Update;EIT;LocalUN;Endpoint Access Control;Endpoint Access Control Admin;Event Log Reader;Audit Log;ACL Realm;;;Local System".split(";");h.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var g="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
159 -u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},D={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",
158 +g.RealmNames=";;Redirection;;Hardware Asset;Remote Control;Storage;Event Manager;Storage Admin;Agent Presence Local;Agent Presence Remote;Circuit Breaker;Network Time;General Information;Firmware Update;EIT;LocalUN;Endpoint Access Control;Endpoint Access Control Admin;Event Log Reader;Audit Log;ACL Realm;;;Local System".split(";");g.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var h="Boot parameters received from CSME;CSME Boot Option % added successfully;HTTPS URI name resolved;HTTPS connected successfully;HTTPSBoot download is completed;Attempt to boot;Exit boot services".split(";"),
159 +u=";No network connection available;Name resolution of URI failed;Connect to URI failed;OEM app not found at local URI;HTTPS TLS Auth failed;HTTPS Digest Auth failed;Verified boot failed (bad image);HTTPS Boot File not found".split(";"),O={1:"",2:"HTTPS",4:"Local PBA",8:"WinRE"},C={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",
160 26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",
161 -1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",
162 -1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2E3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel&reg; ME Time Set",2200:"TCPIP Parameters Set",
163 -2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",
164 -2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3E3:"Opt-In Policy Change",3001:"Send Consent Code Event",
165 -3002:"Start Opt-In Blocked Event"};h.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Invalid ME access","Invalid MEBx access"][b.charCodeAt(0)];if(1606==a){var c=["Disabled","Enabled"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=", "+b.substring(3));return c}return 1607==a?"Remote "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local "+["NoAuth",
166 -"ServerAuth","MutualAuth"][b.charCodeAt(1)]:1617==a?h.RealmNames[ReadInt(b,0)]+", "+["NoAuth","Auth","Disabled"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][b.charCodeAt(0)]:1900==a?"From "+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" to "+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"From "+["None",
167 -"KVM","All"][b.charCodeAt(0)]+" to "+["None","KVM","All"][b.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][b.charCodeAt(0)]:null};h.GetAuditLog=function(a){h.AMT_AuditLog_ReadRecords(1,q,[a,[]])};return h}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
161 +1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1705:"Remote graceful power down initiated",1706:"Remote graceful reset initiated",1707:"Remote Standby initiated",
162 +1708:"Remote Hiberate initiated",1709:"Remote NMI initiated",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2E3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",
163 +2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel&reg; ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",
164 +2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2703:"An existing profile sync was modified",2704:"An existing profile link preference was changed",2705:"Wireless profile share with UEFI enabled setting was changed",
165 +2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3E3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event",3301:"A user has modified the Watchdog Action settings",3302:"A user has modified a Watchdog to add, remove, or alter the Watchdog Action connected to it"};
166 +g.GetAuditLogExtendedDataStr=function(a,b){if((1602==a||1604==a)&&0==b.charCodeAt(0))return b.substring(2,2+b.charCodeAt(1));if(1603==a)return 0==b.charCodeAt(1)?b.substring(3):null;if(1605==a)return["Invalid ME access","Invalid MEBx access"][b.charCodeAt(0)];if(1606==a){var c=["Disabled","Enabled"][b.charCodeAt(0)];0==b.charCodeAt(1)&&(c+=", "+b.substring(3));return c}return 1607==a?"Remote "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][b.charCodeAt(1)]:
167 +1617==a?g.RealmNames[ReadInt(b,0)]+", "+["NoAuth","Auth","Disabled"][b.charCodeAt(4)]:1619==a?["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][b.charCodeAt(0)]:1900==a?"From "+ReadShort(b,0)+"."+ReadShort(b,2)+"."+ReadShort(b,4)+"."+ReadShort(b,6)+" to "+ReadShort(b,8)+"."+ReadShort(b,10)+"."+ReadShort(b,12)+"."+ReadShort(b,14):2100==a?(c=new Date,c.setTime(1E3*ReadInt(b,0)+6E4*(new Date).getTimezoneOffset()),c.toLocaleString()):3E3==a?"From "+["None","KVM","All"][b.charCodeAt(0)]+" to "+
168 +["None","KVM","All"][b.charCodeAt(1)]:3001==a?["Success","Failed 3 times"][b.charCodeAt(0)]:null};g.GetAuditLog=function(a){g.AMT_AuditLog_ReadRecords(1,p,[a,[]])};return g}function hex_md5(b){null==b&&(b="");return forge.md.md5.create().update(b).digest().toHex()}function rstr_md5(b){return hex2rstr(hex_md5(b))}
169 function execArgumentsToXml(b){if(void 0===b||null===b)return null;var c="",a;for(a in b){var d=b[a];d&&(c="reference"===d.__parameterType?c+referenceToXml(a,d):c+instanceToXml(a,d))}return c}
170 function instanceToXml(b,c){if(void 0===c||null===c)return null;var a=!!c.__namespace,d=a?"<q:":"<",e=a?"</q:":"</",a="<r:"+b+(a?' xmlns:q="'+c.__namespace+'"':"")+">",v;for(v in c)c.hasOwnProperty(v)&&0!==v.indexOf("__")&&("function"===typeof c[v]||Array.isArray(c[v])||("object"===typeof c[v]?console.error("only convert one level down..."):a+=d+v+">"+c[v].toString()+e+v+">"));return a+("</r:"+b+">")}
171 function referenceToXml(b,c){if(void 0===c||null===c)return null;var a="<r:"+b+"><a:Address>/wsman</a:Address><a:ReferenceParameters><w:ResourceURI>"+c.__resourceUri+"</w:ResourceURI><w:SelectorSet>",d;for(d in c)c.hasOwnProperty(d)&&0!==d.indexOf("__")&&("function"===typeof c[d]||"object"===typeof c[d]||Array.isArray(c[d])||(a+='<w:Selector Name="'+d+'">'+c[d].toString()+"</w:Selector>"));return a+("</w:SelectorSet></a:ReferenceParameters></r:"+b+">")}
172 function GetSidString(b){for(var c="S-"+b.charCodeAt(0)+"-"+b.charCodeAt(7),a=2;a<b.length/4;a++)c+="-"+ReadIntX(b,4*a);return c}
173 function GetSidByteArray(b){if(!b||null==b)return null;b=b.split("-");if(4>b.length||"s"!=b[0]&&"S"!=b[0])return null;for(var c=1;c<b.length;c++){var a=parseInt(b[c]);if(a!=b[c])return null;b[c]=a}a=String.fromCharCode(b[1])+String.fromCharCode(b.length-3)+ShortToStr(Math.floor(b[2]/Math.pow(2,32)))+IntToStr(b[2]&65535);for(c=3;c<b.length;c++)a+=IntToStrX(b[c]);return a}
173 -(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,p,d,h,y,g,k,m,q,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");y=a.length-1;u.nodeIdCompat&&z.test(a[y])&&(a[y]=a[y].replace(z,""));a=e.concat(a);for(y=0;y<a.length;y+=1)if(c=a[y],"."===c)a.splice(y,1),--y;else if(".."===c)if(1!==y||".."!==a[2]&&".."!==a[0])0<y&&(a.splice(y-1,2),y-=2);else break;
174 -a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(y=c.length;0<y;--y){p=c.slice(0,y).join("/");if(e)for(q=e.length;0<q;--q)if(d=w[e.slice(0,q).join("/")])if(d=d[p]){h=d;g=y;break}if(h)break;!k&&l&&l[p]&&(k=l[p],m=y)}!h&&k&&(h=k,g=m);h&&(c.splice(0,g,h),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,y.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function p(a){if(D.call(g,
175 -a)){var b=g[a];delete g[a];O[a]=!0;B.apply(d,b)}if(!D.call(k,a)&&!D.call(O,a))throw Error("No "+a);return k[a]}function q(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function h(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,E,m,k={},g={},u={},O={},D=Object.prototype.hasOwnProperty,y=[].slice,z=/\.js$/;E=function(a,b){var c,d=q(a),h=d[0];a=d[1];h&&(h=e(h,b),c=p(h));h?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=q(a),
176 -h=d[0],a=d[1],h&&(c=p(h)));return{f:h?h+"!"+a:a,n:a,pr:h,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:h(a)}}};B=function(a,b,c,h){var y,q,e,z,u=[];q=typeof c;var w;h=h||a;if("undefined"===q||"function"===q){b=!b.length&&c.length?["require","exports","module"]:b;for(z=0;z<b.length;z+=1)if(e=E(b[z],h),q=e.f,"require"===q)u[z]=m.require(a);else if("exports"===q)u[z]=m.exports(a),
177 -w=!0;else if("module"===q)y=u[z]=m.module(a);else if(D.call(k,q)||D.call(g,q)||D.call(O,q))u[z]=p(q);else if(e.p)e.p.load(e.n,v(h,!0),l(q),{}),u[z]=k[q];else throw Error(a+" missing "+q);b=c?c.apply(k[a],u):void 0;a&&(y&&y.exports!==d&&y.exports!==k[a]?k[a]=y.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,h,y){if("string"===typeof a)return m[a]?m[a](b):p(E(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
178 -typeof c&&(c=h,h=y);h?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);D.call(k,a)||D.call(g,a)||(g[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var p=
179 -0;p<a.length;++p)this.putByte(a[p])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
180 -else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,p=document.createElement("div"),a=[];
181 -(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(p,{attributes:!0});var x=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),x(d)):(a.push(d),1===a.length&&p.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
174 +(function(b,c){"function"===typeof define&&define.amd?define([],c):b.forge=c()})(this,function(){var b,c,a;(function(d){function e(a,b){var c,q,d,g,x,h,k,m,p,e=b&&b.split("/"),w=u.map,l=w&&w["*"]||{};if(a&&"."===a.charAt(0))if(b){e=e.slice(0,e.length-1);a=a.split("/");x=a.length-1;u.nodeIdCompat&&z.test(a[x])&&(a[x]=a[x].replace(z,""));a=e.concat(a);for(x=0;x<a.length;x+=1)if(c=a[x],"."===c)a.splice(x,1),--x;else if(".."===c)if(1!==x||".."!==a[2]&&".."!==a[0])0<x&&(a.splice(x-1,2),x-=2);else break;
175 +a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((e||l)&&w){c=a.split("/");for(x=c.length;0<x;--x){q=c.slice(0,x).join("/");if(e)for(p=e.length;0<p;--p)if(d=w[e.slice(0,p).join("/")])if(d=d[q]){g=d;h=x;break}if(g)break;!k&&l&&l[q]&&(k=l[q],m=x)}!g&&k&&(g=k,h=m);g&&(c.splice(0,h,g),a=c.join("/"))}return a}function v(a,b){return function(){return w.apply(d,x.call(arguments,0).concat([a,b]))}}function n(a){return function(b){return e(b,a)}}function l(a){return function(b){k[a]=b}}function q(a){if(C.call(h,
176 +a)){var b=h[a];delete h[a];O[a]=!0;B.apply(d,b)}if(!C.call(k,a)&&!C.call(O,a))throw Error("No "+a);return k[a]}function p(a){var b,c=a?a.indexOf("!"):-1;-1<c&&(b=a.substring(0,c),a=a.substring(c+1,a.length));return[b,a]}function g(a){return function(){return u&&u.config&&u.config[a]||{}}}var B,w,D,m,k={},h={},u={},O={},C=Object.prototype.hasOwnProperty,x=[].slice,z=/\.js$/;D=function(a,b){var c,d=p(a),g=d[0];a=d[1];g&&(g=e(g,b),c=q(g));g?a=c&&c.normalize?c.normalize(a,n(b)):e(a,b):(a=e(a,b),d=p(a),
177 +g=d[0],a=d[1],g&&(c=q(g)));return{f:g?g+"!"+a:a,n:a,pr:g,p:c}};m={require:function(a){return v(a)},exports:function(a){var b=k[a];return"undefined"!==typeof b?b:k[a]={}},module:function(a){return{id:a,uri:"",exports:k[a],config:g(a)}}};B=function(a,b,c,g){var x,p,z,e,u=[];p=typeof c;var w;g=g||a;if("undefined"===p||"function"===p){b=!b.length&&c.length?["require","exports","module"]:b;for(e=0;e<b.length;e+=1)if(z=D(b[e],g),p=z.f,"require"===p)u[e]=m.require(a);else if("exports"===p)u[e]=m.exports(a),
178 +w=!0;else if("module"===p)x=u[e]=m.module(a);else if(C.call(k,p)||C.call(h,p)||C.call(O,p))u[e]=q(p);else if(z.p)z.p.load(z.n,v(g,!0),l(p),{}),u[e]=k[p];else throw Error(a+" missing "+p);b=c?c.apply(k[a],u):void 0;a&&(x&&x.exports!==d&&x.exports!==k[a]?k[a]=x.exports:b===d&&w||(k[a]=b))}else a&&(k[a]=c)};b=c=w=function(a,b,c,g,x){if("string"===typeof a)return m[a]?m[a](b):q(D(a,b).f);if(!a.splice){u=a;u.deps&&w(u.deps,u.callback);if(!b)return;b.splice?(a=b,b=c,c=null):a=d}b=b||function(){};"function"===
179 +typeof c&&(c=g,g=x);g?B(d,a,b,c):setTimeout(function(){B(d,a,b,c)},4);return w};w.config=function(a){return w(a)};b._defined=k;a=function(a,b,c){b.splice||(c=b,b=[]);C.call(k,a)||C.call(h,a)||(h[a]=[a,b,c])};a.amd={jQuery:!0}})();a("node_modules/almond/almond",function(){});(function(){function b(a){function c(a){this.data="";this.read=0;if("string"===typeof a)this.data=a;else if(d.isArrayBuffer(a)||d.isArrayBufferView(a)){a=new Uint8Array(a);try{this.data=String.fromCharCode.apply(null,a)}catch(b){for(var q=
180 +0;q<a.length;++q)this.putByte(a[q])}}else if(a instanceof c||"object"===typeof a&&"string"===typeof a.data&&"number"===typeof a.read)this.data=a.data,this.read=a.read;this._constructedStringLength=0}var d=a.util=a.util||{};(function(){if("undefined"!==typeof process&&process.nextTick)d.nextTick=process.nextTick,d.setImmediate="function"===typeof setImmediate?setImmediate:d.nextTick;else if("function"===typeof setImmediate)d.setImmediate=setImmediate,d.nextTick=function(a){return setImmediate(a)};
181 +else{d.setImmediate=function(a){setTimeout(a,0)};if("undefined"!==typeof window&&"function"===typeof window.postMessage){var a=[];d.setImmediate=function(b){a.push(b);1===a.length&&window.postMessage("forge.setImmediate","*")};window.addEventListener("message",function(b){b.source===window&&"forge.setImmediate"===b.data&&(b.stopPropagation(),b=a.slice(),a.length=0,b.forEach(function(a){a()}))},!0)}if("undefined"!==typeof MutationObserver){var b=Date.now(),c=!0,q=document.createElement("div"),a=[];
182 +(new MutationObserver(function(){var b=a.slice();a.length=0;b.forEach(function(a){a()})})).observe(q,{attributes:!0});var y=d.setImmediate;d.setImmediate=function(d){15<Date.now()-b?(b=Date.now(),y(d)):(a.push(d),1===a.length&&q.setAttribute("a",c=!c))}}d.nextTick=d.setImmediate}})();d.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};d.isArrayBuffer=function(a){return"undefined"!==typeof ArrayBuffer&&a instanceof ArrayBuffer};d.isArrayBufferView=function(a){return a&&
183 d.isArrayBuffer(a.buffer)&&void 0!==a.byteLength};d.ByteBuffer=c;d.ByteStringBuffer=c;d.ByteStringBuffer.prototype._optimizeConstructedString=function(a){this._constructedStringLength+=a;4096<this._constructedStringLength&&(this.data.substr(0,1),this._constructedStringLength=0)};d.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};d.ByteStringBuffer.prototype.isEmpty=function(){return 0>=this.length()};d.ByteStringBuffer.prototype.putByte=function(a){return this.putBytes(String.fromCharCode(a))};
184 d.ByteStringBuffer.prototype.fillWithByte=function(a,b){a=String.fromCharCode(a);for(var c=this.data;0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);this.data=c;this._optimizeConstructedString(b);return this};d.ByteStringBuffer.prototype.putBytes=function(a){this.data+=a;this._optimizeConstructedString(a.length);return this};d.ByteStringBuffer.prototype.putString=function(a){return this.putBytes(d.encodeUtf8(a))};d.ByteStringBuffer.prototype.putInt16=function(a){return this.putBytes(String.fromCharCode(a>>8&
185 255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt24=function(a){return this.putBytes(String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt32=function(a){return this.putBytes(String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255))};d.ByteStringBuffer.prototype.putInt16Le=function(a){return this.putBytes(String.fromCharCode(a&255)+String.fromCharCode(a>>
@@ -189,10 +190,10 @@ function(){var a=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+
190 function(a){var b=this.getInt(a);a=2<<a-2;b>=a&&(b-=a<<1);return b};d.ByteStringBuffer.prototype.getBytes=function(a){var b;a?(a=Math.min(this.length(),a),b=this.data.slice(this.read,this.read+a),this.read+=a):0===a?b="":(b=0===this.read?this.data:this.data.slice(this.read),this.clear());return b};d.ByteStringBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.ByteStringBuffer.prototype.at=function(a){return this.data.charCodeAt(this.read+
191 a)};d.ByteStringBuffer.prototype.setAt=function(a,b){this.data=this.data.substr(0,this.read+a)+String.fromCharCode(b)+this.data.substr(this.read+a+1);return this};d.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};d.ByteStringBuffer.prototype.copy=function(){var a=d.createBuffer(this.data);a.read=this.read;return a};d.ByteStringBuffer.prototype.compact=function(){0<this.read&&(this.data=this.data.slice(this.read),this.read=0);return this};d.ByteStringBuffer.prototype.clear=
192 function(){this.data="";this.read=0;return this};d.ByteStringBuffer.prototype.truncate=function(a){a=Math.max(0,this.length()-a);this.data=this.data.substr(this.read,a);this.read=0;return this};d.ByteStringBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.length;++b){var c=this.data.charCodeAt(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.ByteStringBuffer.prototype.toString=function(){return d.decodeUtf8(this.bytes())};d.DataBuffer=function(a,b){b=b||{};this.read=b.readOffset||
192 -0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),p=d.isArrayBufferView(a);c||p?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
193 +0;this.growSize=b.growSize||1024;var c=d.isArrayBuffer(a),q=d.isArrayBufferView(a);c||q?(this.data=c?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength),this.write="writeOffset"in b?b.writeOffset:this.data.byteLength):(this.data=new DataView(new ArrayBuffer(0)),this.write=0,null!==a&&void 0!==a&&this.putBytes(a),"writeOffset"in b&&(this.write=b.writeOffset))};d.DataBuffer.prototype.length=function(){return this.write-this.read};d.DataBuffer.prototype.isEmpty=function(){return 0>=this.length()};
194 d.DataBuffer.prototype.accommodate=function(a,b){if(this.length()>=a)return this;b=Math.max(b||this.growSize,a);var c=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),d=new Uint8Array(this.length()+b);d.set(c);this.data=new DataView(d.buffer);return this};d.DataBuffer.prototype.putByte=function(a){this.accommodate(1);this.data.setUint8(this.write++,a);return this};d.DataBuffer.prototype.fillWithByte=function(a,b){this.accommodate(b);for(var c=0;c<b;++c)this.data.setUint8(a);
194 -return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),p=c.byteLength-c.byteOffset;this.accommodate(p);var x=new Uint8Array(this.data.buffer,this.write);x.set(c);this.write+=p;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),x=new Uint8Array(this.data.buffer),x.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
195 -typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),x=new Uint8Array(a.data.byteLength,this.write),x.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
195 +return this};d.DataBuffer.prototype.putBytes=function(a,b){if(d.isArrayBufferView(a)){var c=new Uint8Array(a.buffer,a.byteOffset,a.byteLength),q=c.byteLength-c.byteOffset;this.accommodate(q);var y=new Uint8Array(this.data.buffer,this.write);y.set(c);this.write+=q;return this}if(d.isArrayBuffer(a))return c=new Uint8Array(a),this.accommodate(c.byteLength),y=new Uint8Array(this.data.buffer),y.set(c,this.write),this.write+=c.byteLength,this;if(a instanceof d.DataBuffer||"object"===typeof a&&"number"===
196 +typeof a.read&&"number"===typeof a.write&&d.isArrayBufferView(a.data))return c=new Uint8Array(a.data.byteLength,a.read,a.length()),this.accommodate(c.byteLength),y=new Uint8Array(a.data.byteLength,this.write),y.set(c),this.write+=c.byteLength,this;a instanceof d.ByteStringBuffer&&(a=a.data,b="binary");b=b||"binary";if("string"===typeof a){if("hex"===b)return this.accommodate(Math.ceil(a.length/2)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.hex.decode(a,c,this.write),this;if("base64"===
197 b)return this.accommodate(3*Math.ceil(a.length/4)),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.base64.decode(a,c,this.write),this;"utf8"===b&&(a=d.encodeUtf8(a),b="binary");if("binary"===b||"raw"===b)return this.accommodate(a.length),c=new Uint8Array(this.data.buffer,this.write),this.write+=d.binary.raw.decode(c),this;if("utf16"===b)return this.accommodate(2*a.length),c=new Uint16Array(this.data.buffer,this.write),this.write+=d.text.utf16.encode(c),this;throw Error("Invalid encoding: "+
198 b);}throw Error("Invalid parameter: "+a);};d.DataBuffer.prototype.putBuffer=function(a){this.putBytes(a);a.clear();return this};d.DataBuffer.prototype.putString=function(a){return this.putBytes(a,"utf16")};d.DataBuffer.prototype.putInt16=function(a){this.accommodate(2);this.data.setInt16(this.write,a);this.write+=2;return this};d.DataBuffer.prototype.putInt24=function(a){this.accommodate(3);this.data.setInt16(this.write,a>>8&65535);this.data.setInt8(this.write,a>>16&255);this.write+=3;return this};
199 d.DataBuffer.prototype.putInt32=function(a){this.accommodate(4);this.data.setInt32(this.write,a);this.write+=4;return this};d.DataBuffer.prototype.putInt16Le=function(a){this.accommodate(2);this.data.setInt16(this.write,a,!0);this.write+=2;return this};d.DataBuffer.prototype.putInt24Le=function(a){this.accommodate(3);this.data.setInt8(this.write,a>>16&255);this.data.setInt16(this.write,a>>8&65535,!0);this.write+=3;return this};d.DataBuffer.prototype.putInt32Le=function(a){this.accommodate(4);this.data.setInt32(this.write,
@@ -202,69 +203,69 @@ this.data.getInt32(this.read,!0);this.read+=4;return a};d.DataBuffer.prototype.g
203 d.DataBuffer.prototype.bytes=function(a){return"undefined"===typeof a?this.data.slice(this.read):this.data.slice(this.read,this.read+a)};d.DataBuffer.prototype.at=function(a){return this.data.getUint8(this.read+a)};d.DataBuffer.prototype.setAt=function(a,b){this.data.setUint8(a,b);return this};d.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};d.DataBuffer.prototype.copy=function(){return new d.DataBuffer(this)};d.DataBuffer.prototype.compact=function(){if(0<this.read){var a=
204 new Uint8Array(this.data.buffer,this.read),b=new Uint8Array(a.byteLength);b.set(a);this.data=new DataView(b);this.write-=this.read;this.read=0}return this};d.DataBuffer.prototype.clear=function(){this.data=new DataView(new ArrayBuffer(0));this.read=this.write=0;return this};d.DataBuffer.prototype.truncate=function(a){this.write=Math.max(0,this.length()-a);this.read=Math.min(this.read,this.write);return this};d.DataBuffer.prototype.toHex=function(){for(var a="",b=this.read;b<this.data.byteLength;++b){var c=
205 this.data.getUint8(b);16>c&&(a+="0");a+=c.toString(16)}return a};d.DataBuffer.prototype.toString=function(a){var b=new Uint8Array(this.data,this.read,this.length());a=a||"utf8";if("binary"===a||"raw"===a)return d.binary.raw.encode(b);if("hex"===a)return d.binary.hex.encode(b);if("base64"===a)return d.binary.base64.encode(b);if("utf8"===a)return d.text.utf8.decode(b);if("utf16"===a)return d.text.utf16.decode(b);throw Error("Invalid encoding: "+a);};d.createBuffer=function(a,b){void 0!==a&&"utf8"===
205 -(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",p="",g="",h=0,k=0;0<c;--c,++h)p=a.charCodeAt(h)^b.charCodeAt(h),10<=k&&(d+=g,g="",k=0),g+=String.fromCharCode(p),++k;return d+g};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
206 -function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",p,g,h,k=0;k<a.length;)p=
207 -a.charCodeAt(k++),g=a.charCodeAt(k++),h=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
208 -c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,p,g,h=0;h<a.length;)c=e[a.charCodeAt(h++)-43],d=e[a.charCodeAt(h++)-43],p=e[a.charCodeAt(h++)-43],g=e[a.charCodeAt(h++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==p&&(b+=String.fromCharCode((d&15)<<4|p>>2),64!==g&&(b+=String.fromCharCode((p&3)<<6|g)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
209 -d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var p=c=c||0,g=0;g<a.length;++g)d[p++]=a.charCodeAt(g);return b?p-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var p=0,g=c;a.length&1&&(p=1,d[g++]=parseInt(a[0],16));for(;p<a.length;p+=2)d[g++]=parseInt(a.substr(p,2),16);return b?g-c:d};d.binary.base64.encode=
210 -function(a,b){for(var c="",d="",p,g,h,k=0;k<a.byteLength;)p=a[k++],g=a[k++],h=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((p&3)<<4|g>>4),isNaN(g)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((g&15)<<2|h>>6),c+=isNaN(h)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h&63)),b&&c.length>b&&(d+=c.substr(0,
211 -b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var p,g,h,k,m=0,q=c;m<a.length;)p=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[q++]=p<<2|g>>4,64!==h&&(d[q++]=(g&15)<<4|h>>2,64!==k&&(d[q++]=(h&3)<<6|k));return b?q-c:d.subarray(0,q)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
212 -var p=b;p||(p=new Uint8Array(a.length));for(var x=c=c||0,g=0;g<a.length;++g)p[x++]=a.charCodeAt(g);return b?x-c:p};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var p=new Uint16Array(d.buffer),g=c=c||0,h=c,k=0;k<a.length;++k)p[h++]=a.charCodeAt(k),g+=2;return b?g-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
206 +(b||"raw")&&(a=d.encodeUtf8(a));return new d.ByteBuffer(a)};d.fillString=function(a,b){for(var c="";0<b;)b&1&&(c+=a),b>>>=1,0<b&&(a+=a);return c};d.xorBytes=function(a,b,c){for(var d="",q="",h="",g=0,k=0;0<c;--c,++g)q=a.charCodeAt(g)^b.charCodeAt(g),10<=k&&(d+=h,h="",k=0),h+=String.fromCharCode(q),++k;return d+h};d.hexToBytes=function(a){var b="",c=0;a.length&1&&(c=1,b+=String.fromCharCode(parseInt(a[0],16)));for(;c<a.length;c+=2)b+=String.fromCharCode(parseInt(a.substr(c,2),16));return b};d.bytesToHex=
207 +function(a){return d.createBuffer(a).toHex()};d.int32ToBytes=function(a){return String.fromCharCode(a>>24&255)+String.fromCharCode(a>>16&255)+String.fromCharCode(a>>8&255)+String.fromCharCode(a&255)};var e=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];d.encode64=function(a,b){for(var c="",d="",q,h,g,k=0;k<a.length;)q=
208 +a.charCodeAt(k++),h=a.charCodeAt(k++),g=a.charCodeAt(k++),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,b)+"\r\n",c=c.substr(b));return d+
209 +c};d.decode64=function(a){a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var b="",c,d,q,h,g=0;g<a.length;)c=e[a.charCodeAt(g++)-43],d=e[a.charCodeAt(g++)-43],q=e[a.charCodeAt(g++)-43],h=e[a.charCodeAt(g++)-43],b+=String.fromCharCode(c<<2|d>>4),64!==q&&(b+=String.fromCharCode((d&15)<<4|q>>2),64!==h&&(b+=String.fromCharCode((q&3)<<6|h)));return b};d.encodeUtf8=function(a){return unescape(encodeURIComponent(a))};d.decodeUtf8=function(a){return decodeURIComponent(escape(a))};d.binary={raw:{},hex:{},base64:{}};
210 +d.binary.raw.encode=function(a){return String.fromCharCode.apply(null,a)};d.binary.raw.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(a.length));for(var q=c=c||0,h=0;h<a.length;++h)d[q++]=a.charCodeAt(h);return b?q-c:d};d.binary.hex.encode=d.bytesToHex;d.binary.hex.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(Math.ceil(a.length/2)));c=c||0;var q=0,h=c;a.length&1&&(q=1,d[h++]=parseInt(a[0],16));for(;q<a.length;q+=2)d[h++]=parseInt(a.substr(q,2),16);return b?h-c:d};d.binary.base64.encode=
211 +function(a,b){for(var c="",d="",q,h,g,k=0;k<a.byteLength;)q=a[k++],h=a[k++],g=a[k++],c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q>>2),c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((q&3)<<4|h>>4),isNaN(h)?c+="==":(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt((h&15)<<2|g>>6),c+=isNaN(g)?"=":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g&63)),b&&c.length>b&&(d+=c.substr(0,
212 +b)+"\r\n",c=c.substr(b));return d+c};d.binary.base64.decode=function(a,b,c){var d=b;d||(d=new Uint8Array(3*Math.ceil(a.length/4)));a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");c=c||0;for(var q,h,g,k,m=0,p=c;m<a.length;)q=e[a.charCodeAt(m++)-43],h=e[a.charCodeAt(m++)-43],g=e[a.charCodeAt(m++)-43],k=e[a.charCodeAt(m++)-43],d[p++]=q<<2|h>>4,64!==g&&(d[p++]=(h&15)<<4|g>>2,64!==k&&(d[p++]=(g&3)<<6|k));return b?p-c:d.subarray(0,p)};d.text={utf8:{},utf16:{}};d.text.utf8.encode=function(a,b,c){a=d.encodeUtf8(a);
213 +var q=b;q||(q=new Uint8Array(a.length));for(var y=c=c||0,h=0;h<a.length;++h)q[y++]=a.charCodeAt(h);return b?y-c:q};d.text.utf8.decode=function(a){return d.decodeUtf8(String.fromCharCode.apply(null,a))};d.text.utf16.encode=function(a,b,c){var d=b;d||(d=new Uint8Array(2*a.length));for(var q=new Uint16Array(d.buffer),h=c=c||0,g=c,k=0;k<a.length;++k)q[g++]=a.charCodeAt(k),h+=2;return b?h-c:d};d.text.utf16.decode=function(a){return String.fromCharCode.apply(null,new Uint16Array(a.buffer))};d.deflate=function(a,
214 b,c){b=d.decode64(a.deflate(d.encode64(b)).rval);c&&(a=2,b.charCodeAt(1)&32&&(a=6),b=b.substring(a,b.length-4));return b};d.inflate=function(a,b,c){a=a.inflate(d.encode64(b)).rval;return null===a?null:d.decode64(a)};var w=function(a,b,c){if(!a)throw Error("WebStorage not available.");null===c?a=a.removeItem(b):(c=d.encode64(JSON.stringify(c)),a=a.setItem(b,c));if("undefined"!==typeof a&&!0!==a.rval)throw b=Error(a.error.message),b.id=a.error.id,b.name=a.error.name,b;},l=function(a,b){if(!a)throw Error("WebStorage not available.");
214 -var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var p=Error(c.error.message);p.id=c.error.id;p.name=c.error.name;throw p;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var p=l(a,b);null===p&&(p={});p[c]=d;w(a,b,p)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},g=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var p in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
215 -c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var p,g=!1,h=null,k;for(k in c){p=c[k];try{if("flash"===p||"both"===p){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);g="flash"===p}if("web"===p||"both"===p)b[0]=localStorage,d=a.apply(this,b),g=!0}catch(m){h=m}if(g)break}if(!g)throw h;return d};d.setItem=function(a,b,c,d,p){O(m,arguments,p)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(g,arguments,d)};d.clearItems=
216 -function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var D=null;d.getQueryVariables=function(a){var b=function(a){var b=
217 -{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),p;0<d?(p=a[c].substring(0,d),d=a[c].substring(d+1)):(p=a[c],d=null);p in b||(b[p]=[]);p in Object.prototype||null===d||b[p].push(unescape(d))}return b};"undefined"===typeof a?(null===D&&(D="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=D):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",p=a.indexOf("?");0<p&&(b=a.substring(0,p),c=a.substring(p+1));a=b.split("/");
218 -0<a.length&&""===a[0]&&a.shift();p=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:p}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
219 -b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,p=b.length;d<p;){var g=b[d++];if(d==p)a[g]=c;else{var h=g in a;if(!h||h&&"object"!==typeof a[g]||h&&null===a[g])a[g]={};a=a[g]}}};d.getPath=function(a,b,c){for(var d=0,p=b.length,g=!0;g&&d<p&&"object"===typeof a&&null!==a;){var h=b[d++];(g=h in a)&&(a=a[h])}return g?a:c};d.deletePath=function(a,b){if("object"===
220 -typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var p=b[c++];if(c==d)delete a[p];else{if(!(p in a)||"object"!==typeof a[p]||null===a[p])break;a=a[p]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,p=0,g=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&g.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":p<arguments.length?g.push(arguments[p++ +1]):g.push("<?>");break;case "%":g.push("%");break;default:g.push("<#"+
221 -c+"?>")}g.push(a.substring(d));return g.join("")};d.formatNumber=function(a,b,c,d){var p=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var g=parseInt(a=Math.abs(+a||0).toFixed(p),10)+"",h=3<g.length?g.length%3:0;return c+(h?g.substr(0,h)+d:"")+g.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+d)+(p?b+Math.abs(a-g).toFixed(p).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
222 -" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var p=parseInt(a[c],10);if(isNaN(p))return null;b.putByte(p)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
223 -2*(8-a.length+b),p=d.createBuffer(),x=0;8>x;++x)if(a[x]&&0!==a[x].length){var g=d.hexToBytes(a[x]);2>g.length&&p.putByte(0);p.putBytes(g)}else p.fillWithByte(0,c),c=0;return p.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],p=0,x=0;x<a.length;x+=
224 -2){for(var g=d.bytesToHex(a[x]+a[x+1]);"0"===g[0]&&"0"!==g;)g=g.substr(1);if("0"===g){var k=c[c.length-1],m=b.length;k&&m===k.end+1?(k.end=m,k.end-k.start>c[p].end-c[p].start&&(p=c.length-1)):c.push({start:m,end:m})}b.push(g)}0<c.length&&(a=c[p],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,k,m){if(0===k){var q=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
225 -Math.max(1,q);URL.revokeObjectURL(g);return b(null,d.cores)}p(m,function(b,d){a.push(x(m,d));c(a,k-1,m)})}function p(a,b){for(var c=[],d=[],x=0;x<a;++x){var h=new Worker(g);h.addEventListener("message",function(p){d.push(p.data);if(d.length===a){for(p=0;p<a;++p)c[p].terminate();b(null,d)}});c.push(h)}for(x=0;x<a;++x)c[x].postMessage(x)}function x(a,b){for(var c=[],d=0;d<a;++d)for(var p=b[d],x=c[d]=[],g=0;g<a;++g)if(d!==g){var h=b[g];(p.st>h.st&&p.st<h.et||h.st>p.st&&h.st<p.et)&&x.push(g)}return c.reduce(function(a,
226 -b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var g=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
227 -Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<q.length;++e)q[e](c);
215 +var c=a.getItem(b);if(a.init)if(null===c.rval){if(c.error){var q=Error(c.error.message);q.id=c.error.id;q.name=c.error.name;throw q;}c=null}else c=c.rval;null!==c&&(c=JSON.parse(d.decode64(c)));return c},m=function(a,b,c,d){var q=l(a,b);null===q&&(q={});q[c]=d;w(a,b,q)},k=function(a,b,c){a=l(a,b);null!==a&&(a=c in a?a[c]:null);return a},h=function(a,b,c){var d=l(a,b);if(null!==d&&c in d){delete d[c];c=!0;for(var q in d){c=!1;break}c&&(d=null);w(a,b,d)}},u=function(a,b){w(a,b,null)},O=function(a,b,
216 +c){var d=null;"undefined"===typeof c&&(c=["web","flash"]);var q,h=!1,g=null,k;for(k in c){q=c[k];try{if("flash"===q||"both"===q){if(null===b[0])throw Error("Flash local storage not available.");d=a.apply(this,b);h="flash"===q}if("web"===q||"both"===q)b[0]=localStorage,d=a.apply(this,b),h=!0}catch(m){g=m}if(h)break}if(!h)throw g;return d};d.setItem=function(a,b,c,d,q){O(m,arguments,q)};d.getItem=function(a,b,c,d){return O(k,arguments,d)};d.removeItem=function(a,b,c,d){O(h,arguments,d)};d.clearItems=
217 +function(a,b,c){O(u,arguments,c)};d.parseUrl=function(a){var b=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;b.lastIndex=0;b=b.exec(a);if(a=null===b?null:{full:a,scheme:b[1],host:b[2],port:b[3],path:b[4]})a.fullHost=a.host,a.port?80!==a.port&&"http"===a.scheme?a.fullHost+=":"+a.port:443!==a.port&&"https"===a.scheme&&(a.fullHost+=":"+a.port):"http"===a.scheme?a.port=80:"https"===a.scheme&&(a.port=443),a.full=a.scheme+"://"+a.fullHost;return a};var C=null;d.getQueryVariables=function(a){var b=function(a){var b=
218 +{};a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),q;0<d?(q=a[c].substring(0,d),d=a[c].substring(d+1)):(q=a[c],d=null);q in b||(b[q]=[]);q in Object.prototype||null===d||b[q].push(unescape(d))}return b};"undefined"===typeof a?(null===C&&(C="undefined"!==typeof window&&window.location&&window.location.search?b(window.location.search.substring(1)):{}),a=C):a=b(a);return a};d.parseFragment=function(a){var b=a,c="",q=a.indexOf("?");0<q&&(b=a.substring(0,q),c=a.substring(q+1));a=b.split("/");
219 +0<a.length&&""===a[0]&&a.shift();q=""===c?{}:d.getQueryVariables(c);return{pathString:b,queryString:c,path:a,query:q}};d.makeRequest=function(a){var b=d.parseFragment(a),c={path:b.pathString,query:b.queryString,getPath:function(a){return"undefined"===typeof a?b.path:b.path[a]},getQuery:function(a,c){var d;"undefined"===typeof a?d=b.query:(d=b.query[a])&&"undefined"!==typeof c&&(d=d[c]);return d},getQueryLast:function(a,b){var d=c.getQuery(a);return d?d[d.length-1]:b}};return c};d.makeLink=function(a,
220 +b,c){a=jQuery.isArray(a)?a.join("/"):a;b=jQuery.param(b||{});c=c||"";return a+(0<b.length?"?"+b:"")+(0<c.length?"#"+c:"")};d.setPath=function(a,b,c){if("object"===typeof a&&null!==a)for(var d=0,q=b.length;d<q;){var h=b[d++];if(d==q)a[h]=c;else{var g=h in a;if(!g||g&&"object"!==typeof a[h]||g&&null===a[h])a[h]={};a=a[h]}}};d.getPath=function(a,b,c){for(var d=0,q=b.length,h=!0;h&&d<q&&"object"===typeof a&&null!==a;){var g=b[d++];(h=g in a)&&(a=a[g])}return h?a:c};d.deletePath=function(a,b){if("object"===
221 +typeof a&&null!==a)for(var c=0,d=b.length;c<d;){var q=b[c++];if(c==d)delete a[q];else{if(!(q in a)||"object"!==typeof a[q]||null===a[q])break;a=a[q]}}};d.isEmpty=function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;return!0};d.format=function(a){var b=/%./g,c,d,q=0,h=[];for(d=0;c=b.exec(a);)switch(d=a.substring(d,b.lastIndex-2),0<d.length&&h.push(d),d=b.lastIndex,c=c[0][1],c){case "s":case "o":q<arguments.length?h.push(arguments[q++ +1]):h.push("<?>");break;case "%":h.push("%");break;default:h.push("<#"+
222 +c+"?>")}h.push(a.substring(d));return h.join("")};d.formatNumber=function(a,b,c,d){var q=isNaN(b=Math.abs(b))?2:b;b=void 0===c?",":c;d=void 0===d?".":d;c=0>a?"-":"";var h=parseInt(a=Math.abs(+a||0).toFixed(q),10)+"",g=3<h.length?h.length%3:0;return c+(g?h.substr(0,g)+d:"")+h.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(q?b+Math.abs(a-h).toFixed(q).slice(2):"")};d.formatSize=function(a){return a=1073741824<=a?d.formatNumber(a/1073741824,2,".","")+" GiB":1048576<=a?d.formatNumber(a/1048576,2,".","")+
223 +" MiB":1024<=a?d.formatNumber(a/1024,0)+" KiB":d.formatNumber(a,0)+" bytes"};d.bytesFromIP=function(a){return-1!==a.indexOf(".")?d.bytesFromIPv4(a):-1!==a.indexOf(":")?d.bytesFromIPv6(a):null};d.bytesFromIPv4=function(a){a=a.split(".");if(4!==a.length)return null;for(var b=d.createBuffer(),c=0;c<a.length;++c){var q=parseInt(a[c],10);if(isNaN(q))return null;b.putByte(q)}return b.getBytes()};d.bytesFromIPv6=function(a){var b=0;a=a.split(":").filter(function(a){0===a.length&&++b;return!0});for(var c=
224 +2*(8-a.length+b),q=d.createBuffer(),h=0;8>h;++h)if(a[h]&&0!==a[h].length){var k=d.hexToBytes(a[h]);2>k.length&&q.putByte(0);q.putBytes(k)}else q.fillWithByte(0,c),c=0;return q.getBytes()};d.bytesToIP=function(a){return 4===a.length?d.bytesToIPv4(a):16===a.length?d.bytesToIPv6(a):null};d.bytesToIPv4=function(a){if(4!==a.length)return null;for(var b=[],c=0;c<a.length;++c)b.push(a.charCodeAt(c));return b.join(".")};d.bytesToIPv6=function(a){if(16!==a.length)return null;for(var b=[],c=[],q=0,h=0;h<a.length;h+=
225 +2){for(var k=d.bytesToHex(a[h]+a[h+1]);"0"===k[0]&&"0"!==k;)k=k.substr(1);if("0"===k){var m=c[c.length-1],p=b.length;m&&p===m.end+1?(m.end=p,m.end-m.start>c[q].end-c[q].start&&(q=c.length-1)):c.push({start:p,end:p})}b.push(k)}0<c.length&&(a=c[q],0<a.end-a.start&&(b.splice(a.start,a.end-a.start+1,""),0===a.start&&b.unshift(""),7===a.end&&b.push("")));return b.join(":")};d.estimateCores=function(a,b){function c(a,m,p){if(0===m){var e=Math.floor(a.reduce(function(a,b){return a+b},0)/a.length);d.cores=
226 +Math.max(1,e);URL.revokeObjectURL(k);return b(null,d.cores)}q(p,function(b,d){a.push(h(p,d));c(a,m-1,p)})}function q(a,b){for(var c=[],d=[],h=0;h<a;++h){var y=new Worker(k);y.addEventListener("message",function(q){d.push(q.data);if(d.length===a){for(q=0;q<a;++q)c[q].terminate();b(null,d)}});c.push(y)}for(h=0;h<a;++h)c[h].postMessage(h)}function h(a,b){for(var c=[],d=0;d<a;++d)for(var q=b[d],y=c[d]=[],g=0;g<a;++g)if(d!==g){var k=b[g];(q.st>k.st&&q.st<k.et||k.st>q.st&&k.st<q.et)&&y.push(g)}return c.reduce(function(a,
227 +b){return Math.max(a,b.length)},0)}"function"===typeof a&&(b=a,a={});a=a||{};if("cores"in d&&!a.update)return b(null,d.cores);if("undefined"!==typeof navigator&&"hardwareConcurrency"in navigator&&0<navigator.hardwareConcurrency)return d.cores=navigator.hardwareConcurrency,b(null,d.cores);if("undefined"===typeof Worker)return d.cores=1,b(null,d.cores);if("undefined"===typeof Blob)return d.cores=2,b(null,d.cores);var k=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){a=
228 +Date.now();for(var b=a+4;Date.now()<b;);self.postMessage({st:a,et:b})})}.toString(),")()"],{type:"application/javascript"}));c([],5,16)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.util)return c.util;c.defined.util=!0;for(var e=0;e<p.length;++e)p[e](c);
229 return c.util}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/util",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.cipher=a.cipher||{};a.cipher.algorithms=a.cipher.algorithms||{};a.cipher.createCipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&
230 (d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!1})};a.cipher.createDecipher=function(b,c){var d=b;"string"===typeof d&&(d=a.cipher.getAlgorithm(d))&&(d=d());if(!d)throw Error("Unsupported algorithm: "+b);return new a.cipher.BlockCipher({algorithm:d,key:c,decrypt:!0})};a.cipher.registerAlgorithm=function(b,c){b=b.toUpperCase();a.cipher.algorithms[b]=c};a.cipher.getAlgorithm=function(b){b=b.toUpperCase();return b in a.cipher.algorithms?
231 a.cipher.algorithms[b]:null};var c=a.cipher.BlockCipher=function(a){this.algorithm=a.algorithm;this.mode=this.algorithm.mode;this.blockSize=this.mode.blockSize;this._finish=!1;this.output=this._input=null;this._op=a.decrypt?this.mode.decrypt:this.mode.encrypt;this._decrypt=a.decrypt;this.algorithm.initialize(a)};c.prototype.start=function(b){b=b||{};var c={},d;for(d in b)c[d]=b[d];c.decrypt=this._decrypt;this._finish=!1;this._input=a.util.createBuffer();this.output=b.output||a.util.createBuffer();
232 this.mode.start(c)};c.prototype.update=function(a){for(a&&this._input.putBuffer(a);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};c.prototype.finish=function(a){!a||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(b){return a(this.blockSize,b,!1)},this.mode.unpad=function(b){return a(this.blockSize,b,!0)});var b={};b.decrypt=this._decrypt;b.overflow=this._input.length()%this.blockSize;if(!this._decrypt&&this.mode.pad&&
232 -!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
233 -c.defined.cipher=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
234 -4<b.length){var d=b;b=a.util.createBuffer();for(var h=0;h<d.length;++h)b.putByte(d[h])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
233 +!this.mode.pad(this._input,b))return!1;this._finish=!0;this.update();return this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,b)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,b)?!1:!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipher)return c.cipher;
234 +c.defined.cipher=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipher}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipher",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b){"string"===typeof b&&(b=a.util.createBuffer(b));if(a.util.isArray(b)&&
235 +4<b.length){var d=b;b=a.util.createBuffer();for(var k=0;k<d.length;++k)b.putByte(d[k])}a.util.isArray(b)||(b=[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()]);return b}function d(a){a[a.length-1]=a[a.length-1]+1&4294967295}function e(a){return[a/4294967296|0,a&4294967295]}a.cipher=a.cipher||{};var w=a.cipher.modes=a.cipher.modes||{};w.ecb=function(a){a=a||{};this.name="ECB";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=
236 Array(this._ints)};w.ecb.prototype.start=function(a){};w.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,
237 this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c])};w.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.ecb.prototype.unpad=function(a,b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cbc=function(a){a=a||{};this.name="CBC";this.cipher=a.cipher;this.blockSize=a.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);
238 this._outBlock=Array(this._ints)};w.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=c(a.iv),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.");};w.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=this._prev[c]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._outBlock[c]);
239 this._prev=this._outBlock};w.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&0<a.length()))return!0;for(c=0;c<this._ints;++c)this._inBlock[c]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(c=0;c<this._ints;++c)b.putInt32(this._prev[c]^this._outBlock[c]);this._prev=this._inBlock.slice(0)};w.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();a.fillWithByte(c,c);return!0};w.cbc.prototype.unpad=function(a,
240 b){if(0<b.overflow)return!1;var c=a.length(),c=a.at(c-1);if(c>this.blockSize<<2)return!1;a.truncate(c);return!0};w.cfb=function(b){b=b||{};this.name="CFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=
240 -this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32()^this._outBlock[p],b.putInt32(this._inBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32()^this._outBlock[p],this._partialOutput.putInt32(this._partialBlock[p]);
241 -if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
242 -d>=this.blockSize)for(var p=0;p<this._ints;++p)this._inBlock[p]=a.getInt32(),b.putInt32(this._inBlock[p]^this._outBlock[p]);else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialBlock[p]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[p]^this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._partialBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
243 -if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
244 -this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var p=0;p<this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]),this._inBlock[p]=this._outBlock[p];else{var h=(this.blockSize-d)%this.blockSize;0<h&&(h=this.blockSize-h);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^
245 -this._outBlock[p]);if(0<h)a.read-=this.blockSize;else for(p=0;p<this._ints;++p)this._inBlock[p]=this._outBlock[p];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<h&&!c)return b.putBytes(this._partialOutput.getBytes(h-this._partialBytes)),this._partialBytes=h,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
246 -b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize)for(var q=0;q<
247 -this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]);else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));
241 +this._iv.slice(0);this._partialBytes=0};w.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32()^this._outBlock[q],b.putInt32(this._inBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32()^this._outBlock[q],this._partialOutput.putInt32(this._partialBlock[q]);
242 +if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&
243 +d>=this.blockSize)for(var q=0;q<this._ints;++q)this._inBlock[q]=a.getInt32(),b.putInt32(this._inBlock[q]^this._outBlock[q]);else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialBlock[q]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[q]^this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._partialBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);
244 +if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb=function(b){b=b||{};this.name="OFB";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");
245 +this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&d>=this.blockSize)for(var q=0;q<this._ints;++q)b.putInt32(a.getInt32()^this._outBlock[q]),this._inBlock[q]=this._outBlock[q];else{var g=(this.blockSize-d)%this.blockSize;0<g&&(g=this.blockSize-g);this._partialOutput.clear();for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^
246 +this._outBlock[q]);if(0<g)a.read-=this.blockSize;else for(q=0;q<this._ints;++q)this._inBlock[q]=this._outBlock[q];0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<g&&!c)return b.putBytes(this._partialOutput.getBytes(g-this._partialBytes)),this._partialBytes=g,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes));this._partialBytes=0}};w.ofb.prototype.decrypt=w.ofb.prototype.encrypt;w.ctr=function(b){b=b||{};this.name="CTR";this.cipher=b.cipher;this.blockSize=
247 +b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=null;this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0};w.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=c(a.iv);this._inBlock=this._iv.slice(0);this._partialBytes=0};w.ctr.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize)for(var p=0;p<
248 +this._ints;++p)b.putInt32(a.getInt32()^this._outBlock[p]);else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);0<e&&(a.read-=this.blockSize);0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));
249 this._partialBytes=0}d(this._inBlock)};w.ctr.prototype.decrypt=w.ctr.prototype.encrypt;w.gcm=function(b){b=b||{};this.name="GCM";this.cipher=b.cipher;this.blockSize=b.blockSize||16;this._ints=this.blockSize/4;this._inBlock=Array(this._ints);this._outBlock=Array(this._ints);this._partialOutput=a.util.createBuffer();this._partialBytes=0;this._R=3774873600};w.gcm.prototype.start=function(b){if(!("iv"in b))throw Error("Invalid IV parameter.");var c=a.util.createBuffer(b.iv);this._cipherLength=0;var k;
250 k="additionalData"in b?a.util.createBuffer(b.additionalData):a.util.createBuffer();this._tagLength="tagLength"in b?b.tagLength:128;this._tag=null;if(b.decrypt&&(this._tag=a.util.createBuffer(b.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints);this.tag=null;this._hashSubkey=Array(this._ints);this.cipher.encrypt([0,0,0,0],this._hashSubkey);this.componentBits=4;this._m=this.generateHashTable(this._hashSubkey,
251 this.componentBits);b=c.length();if(12===b)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];0<c.length();)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(e(8*b)))}this._inBlock=this._j0.slice(0);d(this._inBlock);this._partialBytes=0;k=a.util.createBuffer(k);this._aDataLength=e(8*k.length());(c=k.length()%this.blockSize)&&k.fillWithByte(0,this.blockSize-c);
251 -for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var p=a.length();if(0===p)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&p>=this.blockSize){for(var q=0;q<this._ints;++q)b.putInt32(this._outBlock[q]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-p)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
252 -for(q=0;q<this._ints;++q)this._partialOutput.putInt32(a.getInt32()^this._outBlock[q]);if(0===e||c){c?(q=p%this.blockSize,this._cipherLength+=q,this._partialOutput.truncate(this.blockSize-q)):this._cipherLength+=this.blockSize;for(q=0;q<this._ints;++q)this._outBlock[q]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
253 -this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(p-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var p=a.length();if(p<this.blockSize&&!(c&&0<p))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
254 -this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=p<this.blockSize?this._cipherLength+p%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var g=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,g);g=[];this.cipher.encrypt(this._j0,g);for(var h=0;h<
255 -this._ints;++h)this.tag.putInt32(this._s[h]^g[h]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),p=0;128>p;++p)a[p/32|0]&1<<31-p%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
256 -[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,p=Array(c),h=0;h<c;++h){var q=[0,0,0,0];q[h/d|0]=1<<b-1<<(d-1-h%d)*b;p[h]=this.generateSubHashTable(this.multiply(q,a),b)}return p};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
257 -d=c>>>1,p=Array(c);p[d]=a.slice(0);for(var h=d>>>1;0<h;)this.pow(p[2*h],p[h]=[]),h>>=1;for(h=2;h<d;){for(var q=1;q<h;++q){var e=p[h],w=p[q];p[h+q]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}h*=2}p[0]=[0,0,0,0];for(h=d+1;h<c;++h)q=p[h^d],p[h]=[a[0]^q[0],a[1]^q[1],a[2]^q[2],a[3]^q[3]];return p}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=
258 -v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<q.length;++e)q[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
259 -0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;g=Array(256);u=Array(256);D=Array(4);y=Array(4);for(b=0;4>b;++b)D[b]=Array(256),y[b]=Array(256);for(var c=0,p=0,h,q,k,e,r,b=0;256>b;++b){e=p^p<<1^p<<2^p<<3^p<<4;e=e>>8^e&255^99;g[c]=e;u[e]=c;r=a[e];h=a[c];q=a[h];k=a[q];r^=r<<24^e<<16^e<<8^e;q=(h^q^k)<<24^(c^
260 -k)<<16^(c^q^k)<<8^c^h^k;for(var w=0;4>w;++w)D[w][c]=r,y[w][e]=q,r=r<<24|r>>>8,q=q<<24|q>>>8;0===c?c=p=1:(c=h^a[a[a[h^k]]],p^=a[a[p]])}}function e(a,b){for(var c=a.slice(0),d,p=1,h=c.length,q=k*(h+6+1),m=h;m<q;++m)d=c[m-1],0===m%h?(d=g[d>>>16&255]<<24^g[d>>>8&255]<<16^g[d&255]<<8^g[d>>>24]^O[p]<<24,p++):6<h&&4===m%h&&(d=g[d>>>24]<<24^g[d>>>16&255]<<16^g[d>>>8&255]<<8^g[d&255]),c[m]=c[m-h]^d;if(b){for(var p=y[0],h=y[1],u=y[2],w=y[3],l=c.slice(0),q=c.length,m=0,L=q-k;m<q;m+=k,L-=k)if(0===m||m===q-k)l[m]=
261 -c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var D=0;D<k;++D)d=c[L+D],l[m+(3&-D)]=p[g[d>>>24]]^h[g[d>>>16&255]]^u[g[d>>>8&255]]^w[g[d&255]];c=l}return c}function w(a,b,c,d){var p=a.length/4-1,h,q,k,m,e;d?(h=y[0],q=y[1],k=y[2],m=y[3],e=u):(h=D[0],q=D[1],k=D[2],m=D[3],e=g);var w,l,B,K,E,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<p;++v)K=h[w>>>24]^q[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],E=h[l>>>24]^q[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=h[B>>>24]^
262 -q[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=h[b>>>24]^q[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=E,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
263 -a.cipher.createCipher(c,b.key);var x=d.start;d.start=function(b,c){var h=null;c instanceof a.util.ByteBuffer&&(h=c,c={});c=c||{};c.output=h;c.iv=b;x.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
252 +for(this._s=[0,0,0,0];0<k.length();)this._s=this.ghash(this._hashSubkey,this._s,[k.getInt32(),k.getInt32(),k.getInt32(),k.getInt32()])};w.gcm.prototype.encrypt=function(a,b,c){var q=a.length();if(0===q)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(0===this._partialBytes&&q>=this.blockSize){for(var p=0;p<this._ints;++p)b.putInt32(this._outBlock[p]^=a.getInt32());this._cipherLength+=this.blockSize}else{var e=(this.blockSize-q)%this.blockSize;0<e&&(e=this.blockSize-e);this._partialOutput.clear();
253 +for(p=0;p<this._ints;++p)this._partialOutput.putInt32(a.getInt32()^this._outBlock[p]);if(0===e||c){c?(p=q%this.blockSize,this._cipherLength+=p,this._partialOutput.truncate(this.blockSize-p)):this._cipherLength+=this.blockSize;for(p=0;p<this._ints;++p)this._outBlock[p]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}0<this._partialBytes&&this._partialOutput.getBytes(this._partialBytes);if(0<e&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(e-this._partialBytes)),
254 +this._partialBytes=e,!0;b.putBytes(this._partialOutput.getBytes(q-this._partialBytes));this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock);d(this._inBlock)};w.gcm.prototype.decrypt=function(a,b,c){var q=a.length();if(q<this.blockSize&&!(c&&0<q))return!0;this.cipher.encrypt(this._inBlock,this._outBlock);d(this._inBlock);this._hashBlock[0]=a.getInt32();this._hashBlock[1]=a.getInt32();this._hashBlock[2]=a.getInt32();this._hashBlock[3]=a.getInt32();this._s=this.ghash(this._hashSubkey,
255 +this._s,this._hashBlock);for(a=0;a<this._ints;++a)b.putInt32(this._outBlock[a]^this._hashBlock[a]);this._cipherLength=q<this.blockSize?this._cipherLength+q%this.blockSize:this._cipherLength+this.blockSize};w.gcm.prototype.afterFinish=function(b,c){var d=!0;c.decrypt&&c.overflow&&b.truncate(this.blockSize-c.overflow);this.tag=a.util.createBuffer();var h=this._aDataLength.concat(e(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,h);h=[];this.cipher.encrypt(this._j0,h);for(var g=0;g<
256 +this._ints;++g)this.tag.putInt32(this._s[g]^h[g]);this.tag.truncate(this.tag.length()%(this._tagLength/8));c.decrypt&&this.tag.bytes()!==this._tag&&(d=!1);return d};w.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),q=0;128>q;++q)a[q/32|0]&1<<31-q%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c};w.gcm.prototype.pow=function(a,b){for(var c=a[3]&1,d=3;0<d;--d)b[d]=a[d]>>>1|(a[d-1]&1)<<31;b[0]=a[0]>>>1;c&&(b[0]^=this._R)};w.gcm.prototype.tableMultiply=function(a){for(var b=
257 +[0,0,0,0],c=0;32>c;++c){var d=this._m[c][a[c/8|0]>>>4*(7-c%8)&15];b[0]^=d[0];b[1]^=d[1];b[2]^=d[2];b[3]^=d[3]}return b};w.gcm.prototype.ghash=function(a,b,c){b[0]^=c[0];b[1]^=c[1];b[2]^=c[2];b[3]^=c[3];return this.tableMultiply(b)};w.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,c=16*c,q=Array(c),g=0;g<c;++g){var p=[0,0,0,0];p[g/d|0]=1<<b-1<<(d-1-g%d)*b;q[g]=this.generateSubHashTable(this.multiply(p,a),b)}return q};w.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,
258 +d=c>>>1,q=Array(c);q[d]=a.slice(0);for(var g=d>>>1;0<g;)this.pow(q[2*g],q[g]=[]),g>>=1;for(g=2;g<d;){for(var p=1;p<g;++p){var e=q[g],w=q[p];q[g+p]=[e[0]^w[0],e[1]^w[1],e[2]^w[2],e[3]^w[3]]}g*=2}q[0]=[0,0,0,0];for(g=d+1;g<c;++g)p=q[g^d],q[g]=[a[0]^p[0],a[1]^p[1],a[2]^p[2],a[3]^p[3]];return q}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=
259 +v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.cipherModes)return c.cipherModes;c.defined.cipherModes=!0;for(var e=0;e<p.length;++e)p[e](c);return c.cipherModes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/cipherModes",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,
260 +0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,function(){return new a.aes.Algorithm(b,d)})}function d(){m=!0;O=[0,1,2,4,8,16,32,64,128,27,54];for(var a=Array(256),b=0;128>b;++b)a[b]=b<<1,a[b+128]=b+128<<1^283;h=Array(256);u=Array(256);C=Array(4);x=Array(4);for(b=0;4>b;++b)C[b]=Array(256),x[b]=Array(256);for(var c=0,q=0,g,k,p,e,r,b=0;256>b;++b){e=q^q<<1^q<<2^q<<3^q<<4;e=e>>8^e&255^99;h[c]=e;u[e]=c;r=a[e];g=a[c];k=a[g];p=a[k];r^=r<<24^e<<16^e<<8^e;k=(g^k^p)<<24^(c^
261 +p)<<16^(c^k^p)<<8^c^g^p;for(var w=0;4>w;++w)C[w][c]=r,x[w][e]=k,r=r<<24|r>>>8,k=k<<24|k>>>8;0===c?c=q=1:(c=g^a[a[a[g^p]]],q^=a[a[q]])}}function e(a,b){for(var c=a.slice(0),d,q=1,g=c.length,p=k*(g+6+1),m=g;m<p;++m)d=c[m-1],0===m%g?(d=h[d>>>16&255]<<24^h[d>>>8&255]<<16^h[d&255]<<8^h[d>>>24]^O[q]<<24,q++):6<g&&4===m%g&&(d=h[d>>>24]<<24^h[d>>>16&255]<<16^h[d>>>8&255]<<8^h[d&255]),c[m]=c[m-g]^d;if(b){for(var q=x[0],g=x[1],u=x[2],w=x[3],l=c.slice(0),p=c.length,m=0,L=p-k;m<p;m+=k,L-=k)if(0===m||m===p-k)l[m]=
262 +c[L],l[m+1]=c[L+3],l[m+2]=c[L+2],l[m+3]=c[L+1];else for(var C=0;C<k;++C)d=c[L+C],l[m+(3&-C)]=q[h[d>>>24]]^g[h[d>>>16&255]]^u[h[d>>>8&255]]^w[h[d&255]];c=l}return c}function w(a,b,c,d){var q=a.length/4-1,g,p,k,m,e;d?(g=x[0],p=x[1],k=x[2],m=x[3],e=u):(g=C[0],p=C[1],k=C[2],m=C[3],e=h);var w,l,B,K,D,O;w=b[0]^a[0];l=b[d?3:1]^a[1];B=b[2]^a[2];b=b[d?1:3]^a[3];for(var n=3,v=1;v<q;++v)K=g[w>>>24]^p[l>>>16&255]^k[B>>>8&255]^m[b&255]^a[++n],D=g[l>>>24]^p[B>>>16&255]^k[b>>>8&255]^m[w&255]^a[++n],O=g[B>>>24]^
263 +p[b>>>16&255]^k[w>>>8&255]^m[l&255]^a[++n],b=g[b>>>24]^p[w>>>16&255]^k[l>>>8&255]^m[B&255]^a[++n],w=K,l=D,B=O;c[0]=e[w>>>24]<<24^e[l>>>16&255]<<16^e[B>>>8&255]<<8^e[b&255]^a[++n];c[d?3:1]=e[l>>>24]<<24^e[B>>>16&255]<<16^e[b>>>8&255]<<8^e[w&255]^a[++n];c[2]=e[B>>>24]<<24^e[b>>>16&255]<<16^e[w>>>8&255]<<8^e[l&255]^a[++n];c[d?1:3]=e[b>>>24]<<24^e[w>>>16&255]<<16^e[l>>>8&255]<<8^e[B&255]^a[++n]}function l(b){b=b||{};var c="AES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):
264 +a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var g=null;c instanceof a.util.ByteBuffer&&(g=c,c={});c=c||{};c.output=g;c.iv=b;h.call(d,c)};return d}a.aes=a.aes||{};a.aes.startEncrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!1,mode:d});a.start(b);return a};a.aes.createEncryptionCipher=function(a,b){return l({key:a,output:null,decrypt:!1,mode:b})};a.aes.startDecrypting=function(a,b,c,d){a=l({key:a,output:c,decrypt:!0,mode:d});a.start(b);return a};a.aes.createDecryptionCipher=
265 function(a,b){return l({key:a,output:null,decrypt:!0,mode:b})};a.aes.Algorithm=function(a,b){m||d();var c=this;c.name=a;c.mode=new b({blockSize:16,cipher:{encrypt:function(a,b){return w(c._w,a,b,!1)},decrypt:function(a,b){return w(c._w,a,b,!0)}}});c._init=!1};a.aes.Algorithm.prototype.initialize=function(b){if(!this._init){var c=b.key,d;if("string"===typeof c&&(16===c.length||24===c.length||32===c.length))c=a.util.createBuffer(c);else if(a.util.isArray(c)&&(16===c.length||24===c.length||32===c.length)){d=
265 -c;for(var c=a.util.createBuffer(),x=0;x<d.length;++x)c.putByte(d[x])}if(!a.util.isArray(c)){d=c;var c=[],h=d.length();if(16===h||24===h||32===h)for(h>>>=2,x=0;x<h;++x)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
266 -a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,g,u,O,D,y}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
267 -!0;for(var e=0;e<q.length;++e)q[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
266 +c;for(var c=a.util.createBuffer(),h=0;h<d.length;++h)c.putByte(d[h])}if(!a.util.isArray(c)){d=c;var c=[],g=d.length();if(16===g||24===g||32===g)for(g>>>=2,h=0;h<g;++h)c.push(d.getInt32())}if(!a.util.isArray(c)||4!==c.length&&6!==c.length&&8!==c.length)throw Error("Invalid key parameter.");d=-1!==["CFB","OFB","CTR","GCM"].indexOf(this.mode.name);this._w=e(c,b.decrypt&&!d);this._init=!0}};a.aes._expandKey=function(a,b){m||d();return e(a,b)};a.aes._updateBlock=w;c("AES-ECB",a.cipher.modes.ecb);c("AES-CBC",
267 +a.cipher.modes.cbc);c("AES-CFB",a.cipher.modes.cfb);c("AES-OFB",a.cipher.modes.ofb);c("AES-CTR",a.cipher.modes.ctr);c("AES-GCM",a.cipher.modes.gcm);var m=!1,k=4,h,u,O,C,x}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aes)return c.aes;c.defined.aes=
268 +!0;for(var e=0;e<p.length;++e)p[e](c);return c.aes}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.pki=a.pki||{};a=a.pki.oids=a.oids=a.oids||{};a["1.2.840.113549.1.1.1"]="rsaEncryption";
269 a.rsaEncryption="1.2.840.113549.1.1.1";a["1.2.840.113549.1.1.4"]="md5WithRSAEncryption";a.md5WithRSAEncryption="1.2.840.113549.1.1.4";a["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption";a.sha1WithRSAEncryption="1.2.840.113549.1.1.5";a["1.2.840.113549.1.1.7"]="RSAES-OAEP";a["RSAES-OAEP"]="1.2.840.113549.1.1.7";a["1.2.840.113549.1.1.8"]="mgf1";a.mgf1="1.2.840.113549.1.1.8";a["1.2.840.113549.1.1.9"]="pSpecified";a.pSpecified="1.2.840.113549.1.1.9";a["1.2.840.113549.1.1.10"]="RSASSA-PSS";a["RSASSA-PSS"]=
270 "1.2.840.113549.1.1.10";a["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption";a.sha256WithRSAEncryption="1.2.840.113549.1.1.11";a["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption";a.sha384WithRSAEncryption="1.2.840.113549.1.1.12";a["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption";a.sha512WithRSAEncryption="1.2.840.113549.1.1.13";a["1.3.14.3.2.7"]="desCBC";a.desCBC="1.3.14.3.2.7";a["1.3.14.3.2.26"]="sha1";a.sha1="1.3.14.3.2.26";a["2.16.840.1.101.3.4.2.1"]="sha256";a.sha256="2.16.840.1.101.3.4.2.1";
271 a["2.16.840.1.101.3.4.2.2"]="sha384";a.sha384="2.16.840.1.101.3.4.2.2";a["2.16.840.1.101.3.4.2.3"]="sha512";a.sha512="2.16.840.1.101.3.4.2.3";a["1.2.840.113549.2.5"]="md5";a.md5="1.2.840.113549.2.5";a["1.2.840.113549.1.7.1"]="data";a.data="1.2.840.113549.1.7.1";a["1.2.840.113549.1.7.2"]="signedData";a.signedData="1.2.840.113549.1.7.2";a["1.2.840.113549.1.7.3"]="envelopedData";a.envelopedData="1.2.840.113549.1.7.3";a["1.2.840.113549.1.7.4"]="signedAndEnvelopedData";a.signedAndEnvelopedData="1.2.840.113549.1.7.4";
@@ -278,213 +279,213 @@ a["2.5.4.8"]="stateOrProvinceName";a.stateOrProvinceName="2.5.4.8";a["2.5.4.10"]
279 "subjectAltName";a["2.5.29.8"]="issuerAltName";a["2.5.29.9"]="subjectDirectoryAttributes";a["2.5.29.10"]="basicConstraints";a["2.5.29.11"]="nameConstraints";a["2.5.29.12"]="policyConstraints";a["2.5.29.13"]="basicConstraints";a["2.5.29.14"]="subjectKeyIdentifier";a.subjectKeyIdentifier="2.5.29.14";a["2.5.29.15"]="keyUsage";a.keyUsage="2.5.29.15";a["2.5.29.16"]="privateKeyUsagePeriod";a["2.5.29.17"]="subjectAltName";a.subjectAltName="2.5.29.17";a["2.5.29.18"]="issuerAltName";a.issuerAltName="2.5.29.18";
280 a["2.5.29.19"]="basicConstraints";a.basicConstraints="2.5.29.19";a["2.5.29.20"]="cRLNumber";a["2.5.29.21"]="cRLReason";a["2.5.29.22"]="expirationDate";a["2.5.29.23"]="instructionCode";a["2.5.29.24"]="invalidityDate";a["2.5.29.25"]="cRLDistributionPoints";a["2.5.29.26"]="issuingDistributionPoint";a["2.5.29.27"]="deltaCRLIndicator";a["2.5.29.28"]="issuingDistributionPoint";a["2.5.29.29"]="certificateIssuer";a["2.5.29.30"]="nameConstraints";a["2.5.29.31"]="cRLDistributionPoints";a["2.5.29.32"]="certificatePolicies";
281 a["2.5.29.33"]="policyMappings";a["2.5.29.34"]="policyConstraints";a["2.5.29.35"]="authorityKeyIdentifier";a["2.5.29.36"]="policyConstraints";a["2.5.29.37"]="extKeyUsage";a.extKeyUsage="2.5.29.37";a["2.5.29.46"]="freshestCRL";a["2.5.29.54"]="inhibitAnyPolicy";a["1.3.6.1.5.5.7.3.1"]="serverAuth";a.serverAuth="1.3.6.1.5.5.7.3.1";a["1.3.6.1.5.5.7.3.2"]="clientAuth";a.clientAuth="1.3.6.1.5.5.7.3.2";a["1.3.6.1.5.5.7.3.3"]="codeSigning";a.codeSigning="1.3.6.1.5.5.7.3.3";a["1.3.6.1.5.5.7.3.4"]="emailProtection";
281 -a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var q=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<q.length;++e)q[e](c);return c.oids}},
282 +a.emailProtection="1.3.6.1.5.5.7.3.4";a["1.3.6.1.5.5.7.3.8"]="timeStamping";a.timeStamping="1.3.6.1.5.5.7.3.8"}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var p=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.oids)return c.oids;c.defined.oids=!0;for(var e=0;e<p.length;++e)p[e](c);return c.oids}},
283 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/oids",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1=a.asn1||{};c.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};c.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,
283 -ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,h){if(a.util.isArray(h)){for(var g=[],e=0;e<h.length;++e)void 0!==h[e]&&g.push(h[e]);h=g}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(h),value:h}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
284 -"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,g=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,D=32===(k&32);l=D;if(!l&&m===c.Class.UNIVERSAL&&g===c.Type.BITSTRING&&1<u){var y=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
285 -y))++y,--u}catch(z){}b.read=y}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(y=b.length();0<u;)l.push(c.fromDer(b,e)),u-=y-b.length(),y=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(g===c.Type.BMPSTRING)for(l="",y=0;y<u;y+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,g,D,l)};c.toDer=function(b){var d=a.util.createBuffer(),
286 -h=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?h|=32:k.putByte(0);for(var g=0;g<b.value.length;++g)void 0!==b.value[g]&&k.putBuffer(c.toDer(b.value[g]))}else if(b.type===c.Type.BMPSTRING)for(g=0;g<b.value.length;++g)k.putInt16(b.value.charCodeAt(g));else k.putBytes(b.value);d.putByte(h);if(127>=k.length())d.putByte(k.length()&127);else{g=k.length();b="";do b+=String.fromCharCode(g&255),g>>>=8;while(0<g);d.putByte(b.length|128);for(g=b.length-1;0<=g;--g)d.putByte(b.charCodeAt(g))}d.putBuffer(k);
287 -return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,h,g,e,q=2;q<b.length;++q){d=!0;h=[];g=parseInt(b[q],10);do e=g&127,g>>>=7,d||(e|=128),h.push(e),d=!1;while(0<g);for(d=h.length-1;0<=d;--d)c.putByte(h[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var h=0;0<b.length();)d=b.getByte(),h<<=7,d&128?h+=d&127:(c+="."+(h+d),h=0);
288 -return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,p=parseInt(a.substr(4,2),10),h=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),q=0;if(11<a.length){var y=a.charAt(10),l=10;"+"!==y&&"-"!==y&&(q=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,p);b.setUTCHours(h,e,q,0);l&&(y=a.charAt(l),"+"===y||"-"===y)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===y?b.setTime(+b-
289 -a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,p=parseInt(a.substr(6,2),10),h=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),q=parseInt(a.substr(12,2),10),y=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,x=a.charAt(R);if("+"===x||"-"===x)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===x&&(l*=-1),A=!0;"."===a.charAt(14)&&(y=1E3*parseFloat(a.substr(14),
290 -10));A?(b.setUTCFullYear(c,d,p),b.setUTCHours(h,e,q,y),b.setTime(+b+l)):(b.setFullYear(c,d,p),b.setHours(h,e,q,y));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
284 +ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};c.create=function(b,c,d,g){if(a.util.isArray(g)){for(var h=[],e=0;e<g.length;++e)void 0!==g[e]&&h.push(g[e]);g=h}return{tagClass:b,type:c,constructed:d,composed:d||a.util.isArray(g),value:g}};var d=c.getBerValueLength=function(a){var b=a.getByte();if(128!==b)return b&128?a.getInt((b&127)<<3):b};c.fromDer=function(b,e){void 0===e&&(e=!0);
285 +"string"===typeof b&&(b=a.util.createBuffer(b));if(2>b.length()){var m=Error("Too few bytes to parse DER.");m.bytes=b.length();throw m;}var k=b.getByte(),m=k&192,h=k&31,u=d(b);if(b.length()<u){if(e)throw m=Error("Too few bytes to read ASN.1 value."),m.detail=b.length()+" < "+u,m;u=b.length()}var l,C=32===(k&32);l=C;if(!l&&m===c.Class.UNIVERSAL&&h===c.Type.BITSTRING&&1<u){var x=b.read;if(0===b.getByte()&&(k=b.getByte(),k&=192,k===c.Class.UNIVERSAL||k===c.Class.CONTEXT_SPECIFIC))try{if(l=d(b)===u-(b.read-
286 +x))++x,--u}catch(z){}b.read=x}if(l)if(l=[],void 0===u)for(;;){if(b.bytes(2)===String.fromCharCode(0,0)){b.getBytes(2);break}l.push(c.fromDer(b,e))}else for(x=b.length();0<u;)l.push(c.fromDer(b,e)),u-=x-b.length(),x=b.length();else{if(void 0===u){if(e)throw Error("Non-constructed ASN.1 object of indefinite length.");u=b.length()}if(h===c.Type.BMPSTRING)for(l="",x=0;x<u;x+=2)l+=String.fromCharCode(b.getInt16());else l=b.getBytes(u)}return c.create(m,h,C,l)};c.toDer=function(b){var d=a.util.createBuffer(),
287 +g=b.tagClass|b.type,k=a.util.createBuffer();if(b.composed){b.constructed?g|=32:k.putByte(0);for(var h=0;h<b.value.length;++h)void 0!==b.value[h]&&k.putBuffer(c.toDer(b.value[h]))}else if(b.type===c.Type.BMPSTRING)for(h=0;h<b.value.length;++h)k.putInt16(b.value.charCodeAt(h));else k.putBytes(b.value);d.putByte(g);if(127>=k.length())d.putByte(k.length()&127);else{h=k.length();b="";do b+=String.fromCharCode(h&255),h>>>=8;while(0<h);d.putByte(b.length|128);for(h=b.length-1;0<=h;--h)d.putByte(b.charCodeAt(h))}d.putBuffer(k);
288 +return d};c.oidToDer=function(b){b=b.split(".");var c=a.util.createBuffer();c.putByte(40*parseInt(b[0],10)+parseInt(b[1],10));for(var d,g,h,e,p=2;p<b.length;++p){d=!0;g=[];h=parseInt(b[p],10);do e=h&127,h>>>=7,d||(e|=128),g.push(e),d=!1;while(0<h);for(d=g.length-1;0<=d;--d)c.putByte(g[d])}return c};c.derToOid=function(b){var c;"string"===typeof b&&(b=a.util.createBuffer(b));var d=b.getByte();c=Math.floor(d/40)+"."+d%40;for(var g=0;0<b.length();)d=b.getByte(),g<<=7,d&128?g+=d&127:(c+="."+(g+d),g=0);
289 +return c};c.utcTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,2),10),c=50<=c?1900+c:2E3+c,d=parseInt(a.substr(2,2),10)-1,q=parseInt(a.substr(4,2),10),g=parseInt(a.substr(6,2),10),e=parseInt(a.substr(8,2),10),p=0;if(11<a.length){var x=a.charAt(10),l=10;"+"!==x&&"-"!==x&&(p=parseInt(a.substr(10,2),10),l+=2)}b.setUTCFullYear(c,d,q);b.setUTCHours(g,e,p,0);l&&(x=a.charAt(l),"+"===x||"-"===x)&&(c=parseInt(a.substr(l+1,2),10),a=parseInt(a.substr(l+4,2),10),a=6E4*(60*c+a),"+"===x?b.setTime(+b-
290 +a):b.setTime(+b+a));return b};c.generalizedTimeToDate=function(a){var b=new Date,c=parseInt(a.substr(0,4),10),d=parseInt(a.substr(4,2),10)-1,q=parseInt(a.substr(6,2),10),g=parseInt(a.substr(8,2),10),e=parseInt(a.substr(10,2),10),p=parseInt(a.substr(12,2),10),x=0,l=0,A=!1;"Z"===a.charAt(a.length-1)&&(A=!0);var R=a.length-5,y=a.charAt(R);if("+"===y||"-"===y)l=parseInt(a.substr(R+1,2),10),R=parseInt(a.substr(R+4,2),10),l=6E4*(60*l+R),"+"===y&&(l*=-1),A=!0;"."===a.charAt(14)&&(x=1E3*parseFloat(a.substr(14),
291 +10));A?(b.setUTCFullYear(c,d,q),b.setUTCHours(g,e,p,x),b.setTime(+b+l)):(b.setFullYear(c,d,q),b.setHours(g,e,p,x));return b};c.dateToUtcTime=function(a){if("string"===typeof a)return a;var b="",c=[];c.push((""+a.getUTCFullYear()).substr(2));c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.dateToGeneralizedTime=function(a){if("string"===
292 typeof a)return a;var b="",c=[];c.push(""+a.getUTCFullYear());c.push(""+(a.getUTCMonth()+1));c.push(""+a.getUTCDate());c.push(""+a.getUTCHours());c.push(""+a.getUTCMinutes());c.push(""+a.getUTCSeconds());for(a=0;a<c.length;++a)2>c[a].length&&(b+="0"),b+=c[a];return b+"Z"};c.integerToDer=function(b){var c=a.util.createBuffer();if(-128<=b&&128>b)return c.putSignedInt(b,8);if(-32768<=b&&32768>b)return c.putSignedInt(b,16);if(-8388608<=b&&8388608>b)return c.putSignedInt(b,24);if(-2147483648<=b&&2147483648>
292 -b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,h,e){var g=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
293 -'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){g=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;g&&l<d.value.length;++l)g=d.value[l].optional||!1,b.value[u]&&((g=c.validate(b.value[u],d.value[l],h,e))?++u:d.value[l].optional&&(g=!0)),!g&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
294 -b.value.length+'"');g&&h&&(d.capture&&(h[d.capture]=b.value),d.captureAsn1&&(h[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return g};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,h){var k="";d=d||0;h=h||2;0<d&&(k+="\n");for(var g="",u=0;u<d*h;++u)g+=" ";k+=g+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
293 +b)return c.putSignedInt(b,32);c=Error("Integer too large; max is 32-bits.");c.integer=b;throw c;};c.derToInteger=function(b){"string"===typeof b&&(b=a.util.createBuffer(b));var c=8*b.length();if(32<c)throw Error("Integer too large; max is 32-bits.");return b.getSignedInt(c)};c.validate=function(b,d,g,e){var h=!1;if(b.tagClass!==d.tagClass&&"undefined"!==typeof d.tagClass||b.type!==d.type&&"undefined"!==typeof d.type)e&&(b.tagClass!==d.tagClass&&e.push("["+d.name+'] Expected tag class "'+d.tagClass+
294 +'", got "'+b.tagClass+'"'),b.type!==d.type&&e.push("["+d.name+'] Expected type "'+d.type+'", got "'+b.type+'"'));else if(b.constructed===d.constructed||"undefined"===typeof d.constructed){h=!0;if(d.value&&a.util.isArray(d.value))for(var u=0,l=0;h&&l<d.value.length;++l)h=d.value[l].optional||!1,b.value[u]&&((h=c.validate(b.value[u],d.value[l],g,e))?++u:d.value[l].optional&&(h=!0)),!h&&e&&e.push("["+d.name+'] Tag class "'+d.tagClass+'", type "'+d.type+'" expected value length "'+d.value.length+'", got "'+
295 +b.value.length+'"');h&&g&&(d.capture&&(g[d.capture]=b.value),d.captureAsn1&&(g[d.captureAsn1]=b))}else e&&e.push("["+d.name+'] Expected constructed "'+d.constructed+'", got "'+b.constructed+'"');return h};var e=/[^\\u0000-\\u00ff]/;c.prettyPrint=function(b,d,g){var k="";d=d||0;g=g||2;0<d&&(k+="\n");for(var h="",u=0;u<d*g;++u)h+=" ";k+=h+"Tag: ";switch(b.tagClass){case c.Class.UNIVERSAL:k+="Universal:";break;case c.Class.APPLICATION:k+="Application:";break;case c.Class.CONTEXT_SPECIFIC:k+="Context-Specific:";
296 break;case c.Class.PRIVATE:k+="Private:"}if(b.tagClass===c.Class.UNIVERSAL)switch(k+=b.type,b.type){case c.Type.NONE:k+=" (None)";break;case c.Type.BOOLEAN:k+=" (Boolean)";break;case c.Type.BITSTRING:k+=" (Bit string)";break;case c.Type.INTEGER:k+=" (Integer)";break;case c.Type.OCTETSTRING:k+=" (Octet string)";break;case c.Type.NULL:k+=" (Null)";break;case c.Type.OID:k+=" (Object Identifier)";break;case c.Type.ODESC:k+=" (Object Descriptor)";break;case c.Type.EXTERNAL:k+=" (External or Instance of)";
297 break;case c.Type.REAL:k+=" (Real)";break;case c.Type.ENUMERATED:k+=" (Enumerated)";break;case c.Type.EMBEDDED:k+=" (Embedded PDV)";break;case c.Type.UTF8:k+=" (UTF8)";break;case c.Type.ROID:k+=" (Relative Object Identifier)";break;case c.Type.SEQUENCE:k+=" (Sequence)";break;case c.Type.SET:k+=" (Set)";break;case c.Type.PRINTABLESTRING:k+=" (Printable String)";break;case c.Type.IA5String:k+=" (IA5String (ASCII))";break;case c.Type.UTCTIME:k+=" (UTC time)";break;case c.Type.GENERALIZEDTIME:k+=" (Generalized time)";
297 -break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(g+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,D="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,D+=c.prettyPrint(b.value[u],d+1,h),u+1<b.value.length&&(D+=","));k+=g+"Sub values: "+l+D}else if(k+=g+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(y){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
298 +break;case c.Type.BMPSTRING:k+=" (BMP String)"}else k+=b.type;k=k+"\n"+(h+"Constructed: "+b.constructed+"\n");if(b.composed){for(var l=0,C="",u=0;u<b.value.length;++u)void 0!==b.value[u]&&(l+=1,C+=c.prettyPrint(b.value[u],d+1,g),u+1<b.value.length&&(C+=","));k+=h+"Sub values: "+l+C}else if(k+=h+"Value: ",b.type===c.Type.OID&&(d=c.derToOid(b.value),k+=d,a.pki&&a.pki.oids&&d in a.pki.oids&&(k+=" ("+a.pki.oids[d]+") ")),b.type===c.Type.INTEGER)try{k+=c.derToInteger(b.value)}catch(x){k+="0x"+a.util.bytesToHex(b.value)}else b.type===
299 c.Type.OCTETSTRING?(e.test(b.value)||(k+="("+b.value+") "),k+="0x"+a.util.bytesToHex(b.value)):k=b.type===c.Type.UTF8?k+a.util.decodeUtf8(b.value):b.type===c.Type.PRINTABLESTRING||b.type===c.Type.IA5String?k+b.value:e.test(b.value)?k+("0x"+a.util.bytesToHex(b.value)):0===b.value.length?k+"[null]":k+b.value;return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,
299 -c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var q=0;q<e.length;++q)e[q](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
300 +c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.asn1)return c.asn1;c.defined.asn1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.asn1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/asn1",["require","module","./util","./oids"],function(){n.apply(null,Array.prototype.slice.call(arguments,
301 0))})})();(function(){function b(a){function c(){l=String.fromCharCode(128);l+=a.util.fillString(String.fromCharCode(0),64);n=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9];m=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21];k=Array(64);for(var b=0;64>b;++b)k[b]=Math.floor(4294967296*
301 -Math.abs(Math.sin(b+1)));g=!0}function d(a,b,c){for(var p,h,g,e,x,q,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;x=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),p=x^g&(e^x),p=h+p+k[l]+b[l],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;32>l;++l)p=e^x&(g^e),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;48>l;++l)p=g^e^x,p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;for(;64>l;++l)p=e^(g|~x),p=h+p+k[l]+b[n[l]],q=m[l],h=x,x=e,e=g,g+=p<<q|p>>>32-q;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
302 -a.h3+x|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){g||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
303 -h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,g){"utf8"===g&&(c=a.util.encodeUtf8(c));var q=c.length;m.messageLength+=q;for(var q=[q/4294967296>>>0,q>>>0],x=m.fullMessageLength.length-1;0<=x;--x)m.fullMessageLength[x]+=q[1],q[1]=q[0]+(m.fullMessageLength[x]/4294967296>>>0),m.fullMessageLength[x]>>>=0,q[0]=q[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
304 -m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var g,q=0,x=m.fullMessageLength.length-1;0<=x;--x)g=8*m.fullMessageLength[x]+q,q=g/4294967296>>>0,c.putInt32Le(g>>>0);g={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(g,k,c);c=a.util.createBuffer();c.putInt32Le(g.h0);c.putInt32Le(g.h1);c.putInt32Le(g.h2);c.putInt32Le(g.h3);return c};return m};var l=null,n=null,m=null,k=null,g=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
305 -!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
306 -0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,z,A,w,x=d.length();64<=x;){h=a.h0;e=a.h1;q=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)p=d.getInt32(),b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;20>w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=l^e&(q^l),p=(h<<5|h>>>27)+A+z+1518500249+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;32>
307 -w;++w)p=b[w-3]^b[w-8]^b[w-14]^b[w-16],p=p<<1|p>>>31,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;40>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>27)+A+z+1859775393+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;60>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e&q|l&(e^q),p=(h<<5|h>>>27)+A+z+2400959708+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;for(;80>w;++w)p=b[w-6]^b[w-16]^b[w-28]^b[w-32],p=p<<2|p>>>30,b[w]=p,A=e^q^l,p=(h<<5|h>>>
308 -27)+A+z+3395469782+p,z=l,l=q,q=e<<30|e>>>2,e=h,h=p;a.h0=a.h0+h|0;a.h1=a.h1+e|0;a.h2=a.h2+q|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;x-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),h=Array(80),g={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){g.messageLength=
309 -0;g.fullMessageLength=g.messageLength64=[];for(var c=g.messageLengthSize/4,h=0;h<c;++h)g.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return g}};g.start();g.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;g.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],y=g.fullMessageLength.length-1;0<=y;--y)g.fullMessageLength[y]+=w[1],w[1]=w[0]+(g.fullMessageLength[y]/4294967296>>>0),g.fullMessageLength[y]>>>=
310 -0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return g};g.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,g.blockLength-(g.fullMessageLength[g.fullMessageLength.length-1]+g.messageLengthSize&g.blockLength-1)));a.util.createBuffer();for(var w,D,y=8*g.fullMessageLength[0],z=0;z<g.fullMessageLength.length;++z)w=8*g.fullMessageLength[z+1],D=w/4294967296>>>0,y+=D,l.putInt32(y>>>0),y=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
311 -h4:b.h4};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return g};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
312 -!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,l,A,w,x,C,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
313 -for(;64>l;++l)p=b[l-2],p=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,h=b[l-15],h=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,b[l]=p+b[l-7]+h+b[l-16]|0;A=a.h0;w=a.h1;x=a.h2;C=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)p=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),h=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),q=A&w|x&(A^w),p=r+p+e+n[l]+b[l],h+=q,r=B,B=J,J=H,H=C+p|0,C=x,x=w,w=A,A=p+h|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+x|0;a.h3=a.h3+C|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
302 +Math.abs(Math.sin(b+1)));h=!0}function d(a,b,c){for(var q,h,g,e,y,p,l,w=c.length();64<=w;){h=a.h0;g=a.h1;e=a.h2;y=a.h3;for(l=0;16>l;++l)b[l]=c.getInt32Le(),q=y^g&(e^y),q=h+q+k[l]+b[l],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;32>l;++l)q=e^y&(g^e),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;48>l;++l)q=g^e^y,q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;for(;64>l;++l)q=e^(g|~y),q=h+q+k[l]+b[n[l]],p=m[l],h=y,y=e,e=g,g+=q<<p|q>>>32-p;a.h0=a.h0+h|0;a.h1=a.h1+g|0;a.h2=a.h2+e|0;a.h3=
303 +a.h3+y|0;w-=64}}var e=a.md5=a.md5||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.md5=a.md.algorithms.md5=e;e.create=function(){h||c();var b=null,e=a.util.createBuffer(),k=Array(16),m={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){m.messageLength=0;m.fullMessageLength=m.messageLength64=[];for(var c=m.messageLengthSize/4,d=0;d<c;++d)m.fullMessageLength.push(0);e=a.util.createBuffer();b={h0:1732584193,h1:4023233417,
304 +h2:2562383102,h3:271733878};return m}};m.start();m.update=function(c,h){"utf8"===h&&(c=a.util.encodeUtf8(c));var p=c.length;m.messageLength+=p;for(var p=[p/4294967296>>>0,p>>>0],y=m.fullMessageLength.length-1;0<=y;--y)m.fullMessageLength[y]+=p[1],p[1]=p[0]+(m.fullMessageLength[y]/4294967296>>>0),m.fullMessageLength[y]>>>=0,p[0]=p[1]/4294967296>>>0;e.putBytes(c);d(b,k,e);(2048<e.read||0===e.length())&&e.compact();return m};m.digest=function(){var c=a.util.createBuffer();c.putBytes(e.bytes());c.putBytes(l.substr(0,
305 +m.blockLength-(m.fullMessageLength[m.fullMessageLength.length-1]+m.messageLengthSize&m.blockLength-1)));for(var h,p=0,y=m.fullMessageLength.length-1;0<=y;--y)h=8*m.fullMessageLength[y]+p,p=h/4294967296>>>0,c.putInt32Le(h>>>0);h={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3};d(h,k,c);c=a.util.createBuffer();c.putInt32Le(h.h0);c.putInt32Le(h.h1);c.putInt32Le(h.h2);c.putInt32Le(h.h3);return c};return m};var l=null,n=null,m=null,k=null,h=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=
306 +!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md5)return c.md5;c.defined.md5=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md5}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,
307 +0))};a("js/md5",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,z,A,w,y=d.length();64<=y;){g=a.h0;e=a.h1;p=a.h2;l=a.h3;z=a.h4;for(w=0;16>w;++w)q=d.getInt32(),b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;20>w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=l^e&(p^l),q=(g<<5|g>>>27)+A+z+1518500249+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;32>
308 +w;++w)q=b[w-3]^b[w-8]^b[w-14]^b[w-16],q=q<<1|q>>>31,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;40>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>27)+A+z+1859775393+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;60>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e&p|l&(e^p),q=(g<<5|g>>>27)+A+z+2400959708+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;for(;80>w;++w)q=b[w-6]^b[w-16]^b[w-28]^b[w-32],q=q<<2|q>>>30,b[w]=q,A=e^p^l,q=(g<<5|g>>>
309 +27)+A+z+3395469782+q,z=l,l=p,p=e<<30|e>>>2,e=g,g=q;a.h0=a.h0+g|0;a.h1=a.h1+e|0;a.h2=a.h2+p|0;a.h3=a.h3+l|0;a.h4=a.h4+z|0;y-=64}}var d=a.sha1=a.sha1||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha1=a.md.algorithms.sha1=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),l=!0);var b=null,d=a.util.createBuffer(),g=Array(80),h={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){h.messageLength=
310 +0;h.fullMessageLength=h.messageLength64=[];for(var c=h.messageLengthSize/4,g=0;g<c;++g)h.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520};return h}};h.start();h.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var w=e.length;h.messageLength+=w;for(var w=[w/4294967296>>>0,w>>>0],x=h.fullMessageLength.length-1;0<=x;--x)h.fullMessageLength[x]+=w[1],w[1]=w[0]+(h.fullMessageLength[x]/4294967296>>>0),h.fullMessageLength[x]>>>=
311 +0,w[0]=w[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return h};h.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,h.blockLength-(h.fullMessageLength[h.fullMessageLength.length-1]+h.messageLengthSize&h.blockLength-1)));a.util.createBuffer();for(var w,C,x=8*h.fullMessageLength[0],z=0;z<h.fullMessageLength.length;++z)w=8*h.fullMessageLength[z+1],C=w/4294967296>>>0,x+=C,l.putInt32(x>>>0),x=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,
312 +h4:b.h4};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);return l};return h};var e=null,l=!1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha1)return c.sha1;c.defined.sha1=
313 +!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,l,A,w,y,E,H,J,B,r,v=d.length();64<=v;){for(l=0;16>l;++l)b[l]=d.getInt32();
314 +for(;64>l;++l)q=b[l-2],q=(q>>>17|q<<15)^(q>>>19|q<<13)^q>>>10,g=b[l-15],g=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,b[l]=q+b[l-7]+g+b[l-16]|0;A=a.h0;w=a.h1;y=a.h2;E=a.h3;H=a.h4;J=a.h5;B=a.h6;r=a.h7;for(l=0;64>l;++l)q=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),e=B^H&(J^B),g=(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10),p=A&w|y&(A^w),q=r+q+e+n[l]+b[l],g+=p,r=B,B=J,J=H,H=E+q|0,E=y,y=w,w=A,A=q+g|0;a.h0=a.h0+A|0;a.h1=a.h1+w|0;a.h2=a.h2+y|0;a.h3=a.h3+E|0;a.h4=a.h4+H|0;a.h5=a.h5+J|0;a.h6=a.h6+B|0;a.h7=a.h7+r|0;v-=
315 64}}var d=a.sha256=a.sha256||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha256=a.md.algorithms.sha256=d;d.create=function(){l||(e=String.fromCharCode(128),e+=a.util.fillString(String.fromCharCode(0),64),n=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,
315 -2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),h=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
316 -messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,h=0;h<c;++h)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var y=e.length;u.messageLength+=y;for(var y=[y/4294967296>>>0,y>>>0],w=u.fullMessageLength.length-
317 -1;0<=w;--w)u.fullMessageLength[w]+=y[1],y[1]=y[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,y[0]=y[1]/4294967296>>>0;d.putBytes(e);c(b,h,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,y,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
318 -8*u.fullMessageLength[A+1],y=w/4294967296>>>0,z+=y,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,h,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
319 -{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
320 -Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var p,h,e,q,k,x,C,l,w,B,r,n,v,L,Y,K,E,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],p=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,h=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,q=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
321 -16],k=h+w[1]+q+B[1],b[S][0]=p+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];E=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)p=((E>>>14|V<<18)^(E>>>18|V<<14)^(V>>>9|E<<23))>>>0,k=((E<<18|V>>>14)^(E<<14|V>>>18)^(V<<23|E>>>9))>>>0,h=(ba^E&(I^ba))>>>0,x=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,q=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
322 -C=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+x+m[S][1]+b[S][1],p=G+p+h+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,h=k>>>0,k=q+l,e=e+C+(k/4294967296>>>0)>>>0,q=k>>>0,G=ba,F=W,ba=I,W=aa,I=E,aa=V,k=K+h,E=Y+p+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=h+q,w=p+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
323 -k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+E+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
316 +2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=!0);var b=null,d=a.util.createBuffer(),g=Array(64),u={algorithm:"sha256",blockLength:64,digestLength:32,
317 +messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){u.messageLength=0;u.fullMessageLength=u.messageLength64=[];for(var c=u.messageLengthSize/4,g=0;g<c;++g)u.fullMessageLength.push(0);d=a.util.createBuffer();b={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225};return u}};u.start();u.update=function(e,l){"utf8"===l&&(e=a.util.encodeUtf8(e));var x=e.length;u.messageLength+=x;for(var x=[x/4294967296>>>0,x>>>0],w=u.fullMessageLength.length-
318 +1;0<=w;--w)u.fullMessageLength[w]+=x[1],x[1]=x[0]+(u.fullMessageLength[w]/4294967296>>>0),u.fullMessageLength[w]>>>=0,x[0]=x[1]/4294967296>>>0;d.putBytes(e);c(b,g,d);(2048<d.read||0===d.length())&&d.compact();return u};u.digest=function(){var l=a.util.createBuffer();l.putBytes(d.bytes());l.putBytes(e.substr(0,u.blockLength-(u.fullMessageLength[u.fullMessageLength.length-1]+u.messageLengthSize&u.blockLength-1)));a.util.createBuffer();for(var w,x,z=8*u.fullMessageLength[0],A=0;A<u.fullMessageLength.length;++A)w=
319 +8*u.fullMessageLength[A+1],x=w/4294967296>>>0,z+=x,l.putInt32(z>>>0),z=w;w={h0:b.h0,h1:b.h1,h2:b.h2,h3:b.h3,h4:b.h4,h5:b.h5,h6:b.h6,h7:b.h7};c(w,g,l);l=a.util.createBuffer();l.putInt32(w.h0);l.putInt32(w.h1);l.putInt32(w.h2);l.putInt32(w.h3);l.putInt32(w.h4);l.putInt32(w.h5);l.putInt32(w.h6);l.putInt32(w.h7);return l};return u};var e=null,l=!1,n=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge=
320 +{}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.sha256)return c.sha256;c.defined.sha256=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha256}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha256",["require","module","./util"],function(){n.apply(null,
321 +Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){for(var q,g,e,p,k,y,E,l,w,B,r,n,v,L,Y,K,D,V,I,aa,ba,W,G,F,S,Z=d.length();128<=Z;){for(S=0;16>S;++S)b[S][0]=d.getInt32()>>>0,b[S][1]=d.getInt32()>>>0;for(;80>S;++S)k=b[S-2],w=k[0],k=k[1],q=((w>>>19|k<<13)^(k>>>29|w<<3)^w>>>6)>>>0,g=((w<<13|k>>>19)^(k<<3|w>>>29)^(w<<26|k>>>6))>>>0,k=b[S-15],w=k[0],k=k[1],e=((w>>>1|k<<31)^(w>>>8|k<<24)^w>>>7)>>>0,p=((w<<31|k>>>1)^(w<<24|k>>>8)^(w<<25|k>>>7))>>>0,w=b[S-7],B=b[S-
322 +16],k=g+w[1]+p+B[1],b[S][0]=q+w[0]+e+B[0]+(k/4294967296>>>0)>>>0,b[S][1]=k>>>0;w=a[0][0];B=a[0][1];r=a[1][0];n=a[1][1];v=a[2][0];L=a[2][1];Y=a[3][0];K=a[3][1];D=a[4][0];V=a[4][1];I=a[5][0];aa=a[5][1];ba=a[6][0];W=a[6][1];G=a[7][0];F=a[7][1];for(S=0;80>S;++S)q=((D>>>14|V<<18)^(D>>>18|V<<14)^(V>>>9|D<<23))>>>0,k=((D<<18|V>>>14)^(D<<14|V>>>18)^(V<<23|D>>>9))>>>0,g=(ba^D&(I^ba))>>>0,y=(W^V&(aa^W))>>>0,e=((w>>>28|B<<4)^(B>>>2|w<<30)^(B>>>7|w<<25))>>>0,p=((w<<4|B>>>28)^(B<<30|w>>>2)^(B<<25|w>>>7))>>>0,
323 +E=(w&r|v&(w^r))>>>0,l=(B&n|L&(B^n))>>>0,k=F+k+y+m[S][1]+b[S][1],q=G+q+g+m[S][0]+b[S][0]+(k/4294967296>>>0)>>>0,g=k>>>0,k=p+l,e=e+E+(k/4294967296>>>0)>>>0,p=k>>>0,G=ba,F=W,ba=I,W=aa,I=D,aa=V,k=K+g,D=Y+q+(k/4294967296>>>0)>>>0,V=k>>>0,Y=v,K=L,v=r,L=n,r=w,n=B,k=g+p,w=q+e+(k/4294967296>>>0)>>>0,B=k>>>0;k=a[0][1]+B;a[0][0]=a[0][0]+w+(k/4294967296>>>0)>>>0;a[0][1]=k>>>0;k=a[1][1]+n;a[1][0]=a[1][0]+r+(k/4294967296>>>0)>>>0;a[1][1]=k>>>0;k=a[2][1]+L;a[2][0]=a[2][0]+v+(k/4294967296>>>0)>>>0;a[2][1]=k>>>0;
324 +k=a[3][1]+K;a[3][0]=a[3][0]+Y+(k/4294967296>>>0)>>>0;a[3][1]=k>>>0;k=a[4][1]+V;a[4][0]=a[4][0]+D+(k/4294967296>>>0)>>>0;a[4][1]=k>>>0;k=a[5][1]+aa;a[5][0]=a[5][0]+I+(k/4294967296>>>0)>>>0;a[5][1]=k>>>0;k=a[6][1]+W;a[6][0]=a[6][0]+ba+(k/4294967296>>>0)>>>0;a[6][1]=k>>>0;k=a[7][1]+F;a[7][0]=a[7][0]+G+(k/4294967296>>>0)>>>0;a[7][1]=k>>>0;Z-=128}}var d=a.sha512=a.sha512||{};a.md=a.md||{};a.md.algorithms=a.md.algorithms||{};a.md.sha512=a.md.algorithms.sha512=d;var e=a.sha384=a.sha512.sha384=a.sha512.sha384||
325 {};e.create=function(){return d.create("SHA-384")};a.md.sha384=a.md.algorithms.sha384=e;a.sha512.sha256=a.sha512.sha256||{create:function(){return d.create("SHA-512/256")}};a.md["sha512/256"]=a.md.algorithms["sha512/256"]=a.sha512.sha256;a.sha512.sha224=a.sha512.sha224||{create:function(){return d.create("SHA-512/224")}};a.md["sha512/224"]=a.md.algorithms["sha512/224"]=a.sha512.sha224;d.create=function(b){n||(l=String.fromCharCode(128),l+=a.util.fillString(String.fromCharCode(0),128),m=[[1116352408,
326 3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],
327 [1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,
328 106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],
329 [3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],k={"SHA-512":[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],
330 [528734635,4215389547],[1541459225,327033209]],"SHA-384":[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],"SHA-512/256":[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],"SHA-512/224":[[2352822216,424955298],[1944164710,
330 -2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],h=null,e=a.util.createBuffer(),y=Array(80),z=0;80>z;++z)y[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
331 -0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();h=Array(d.length);for(c=0;c<d.length;++c)h[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var g=b.length;A.messageLength+=g;for(var g=[g/4294967296>>>0,g>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=g[1],g[1]=g[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,g[0]=
332 -g[1]/4294967296>>>0;e.putBytes(b);c(h,y,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var x,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)x=8*A.fullMessageLength[u+1],k=x/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=x;x=Array(h.length);for(u=0;u<h.length;++u)x[u]=
333 -h[u].slice(0);c(x,y,d);d=a.util.createBuffer();k="SHA-512"===b?x.length:"SHA-384"===b?x.length-2:x.length-4;for(u=0;u<k;++u)d.putInt32(x[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(x[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
334 -c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var q=0;q<e.length;++q)e[q](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
335 -a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var q=0;q<e.length;++q)e[q](c);return c.md}},l=a;a=function(b,
331 +2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]]},n=!0);"undefined"===typeof b&&(b="SHA-512");if(!(b in k))throw Error("Invalid SHA-512 algorithm: "+b);for(var d=k[b],g=null,e=a.util.createBuffer(),x=Array(80),z=0;80>z;++z)x[z]=Array(2);var A={algorithm:b.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){A.messageLength=
332 +0;A.fullMessageLength=A.messageLength128=[];for(var b=A.messageLengthSize/4,c=0;c<b;++c)A.fullMessageLength.push(0);e=a.util.createBuffer();g=Array(d.length);for(c=0;c<d.length;++c)g[c]=d[c].slice(0);return A}};A.start();A.update=function(b,d){"utf8"===d&&(b=a.util.encodeUtf8(b));var h=b.length;A.messageLength+=h;for(var h=[h/4294967296>>>0,h>>>0],k=A.fullMessageLength.length-1;0<=k;--k)A.fullMessageLength[k]+=h[1],h[1]=h[0]+(A.fullMessageLength[k]/4294967296>>>0),A.fullMessageLength[k]>>>=0,h[0]=
333 +h[1]/4294967296>>>0;e.putBytes(b);c(g,x,e);(2048<e.read||0===e.length())&&e.compact();return A};A.digest=function(){var d=a.util.createBuffer();d.putBytes(e.bytes());d.putBytes(l.substr(0,A.blockLength-(A.fullMessageLength[A.fullMessageLength.length-1]+A.messageLengthSize&A.blockLength-1)));a.util.createBuffer();for(var y,k,m=8*A.fullMessageLength[0],u=0;u<A.fullMessageLength.length;++u)y=8*A.fullMessageLength[u+1],k=y/4294967296>>>0,m+=k,d.putInt32(m>>>0),m=y;y=Array(g.length);for(u=0;u<g.length;++u)y[u]=
334 +g[u].slice(0);c(y,x,d);d=a.util.createBuffer();k="SHA-512"===b?y.length:"SHA-384"===b?y.length-2:y.length-4;for(u=0;u<k;++u)d.putInt32(y[u][0]),u===k-1&&"SHA-512/224"===b||d.putInt32(y[u][1]);return d};return A};var l=null,n=!1,m=null,k=null}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
335 +c=c||{};c.defined=c.defined||{};if(c.defined.sha512)return c.sha512;c.defined.sha512=!0;for(var p=0;p<e.length;++p)e[p](c);return c.sha512}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/sha512",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.md=a.md||{};
336 +a.md.algorithms={md5:a.md5,sha1:a.sha1,sha256:a.sha256};a.md.md5=a.md5;a.md.sha1=a.sha1;a.md.sha256=a.sha256}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.md)return c.md;c.defined.md=!0;for(var p=0;p<e.length;++p)e[p](c);return c.md}},l=a;a=function(b,
337 c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/md","require module ./md5 ./sha1 ./sha256 ./sha512".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.hmac=a.hmac||{}).create=function(){var b=null,c=null,d=null,e={start:function(e,m){if(null!==e)if("string"===typeof e)if(e=e.toLowerCase(),e in a.md.algorithms)b=
337 -a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var g=0;g<k.length;++g)m.putByte(k[g])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(g=0;g<l;++g)k=m.at(g),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,g=0;g<k;++g)c.putByte(54),
338 +a.md.algorithms[e].create();else throw Error('Unknown hash algorithm "'+e+'"');else b=e;if(null!==m){if("string"===typeof m)m=a.util.createBuffer(m);else if(a.util.isArray(m)){var k=m;m=a.util.createBuffer();for(var h=0;h<k.length;++h)m.putByte(k[h])}var l=m.length();l>b.blockLength&&(b.start(),b.update(m.bytes()),m=b.digest());c=a.util.createBuffer();d=a.util.createBuffer();l=m.length();for(h=0;h<l;++h)k=m.at(h),c.putByte(54^k),d.putByte(92^k);if(l<b.blockLength)for(k=b.blockLength-l,h=0;h<k;++h)c.putByte(54),
339 d.putByte(92);c=c.bytes();d=d.bytes()}b.start();b.update(c)},update:function(a){b.update(a)},getMac:function(){var a=b.digest().bytes();b.start();b.update(d);b.update(a);return b.digest()}};e.digest=e.getMac;return e}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
339 -{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var q=0;q<e.length;++q)e[q](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],p=function(a,
340 -b){return" "+b},h=0;h<a.values.length;++h)d.push(a.values[h].replace(/^(\S+\r\n)/,p));b+=d.join(",")+"\r\n";d=0;a=-1;for(h=0;h<b.length;++h,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=h-a-1,a=-1,++h;else if(" "===b[h]||"\t"===b[h]||","===b[h])a=h;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var h="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
341 -h+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},h+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),h+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)h+=c(b.headers[e]);b.procType&&(h+="\r\n");h+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return h+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
342 -h=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,g;;){g=d.exec(b);if(!g)break;var q={type:g[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(g[3])};c.push(q);if(g[2]){for(var l=g[2].split(e),D=0;g&&D<l.length;){g=l[D].replace(/\s+$/,"");for(var y=D+1;y<l.length;++y){var z=l[y];if(!/\s/.test(z[0]))break;g+=z;D=y}if(g=g.match(h)){for(var y={name:g[1],values:[]},z=g[2].split(","),A=0;A<z.length;++A)y.values.push(z[A].replace(/^\s+/,""));if(q.procType)if(q.contentDomain||
343 -"Content-Domain"!==y.name)if(q.dekInfo||"DEK-Info"!==y.name)q.headers.push(y);else{if(0===y.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');q.dekInfo={algorithm:z[0],parameters:z[1]||null}}else q.contentDomain=z[0]||"";else{if("Proc-Type"!==y.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==y.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
344 -q.procType={version:z[0],type:z[1]}}}++D}if("ENCRYPTED"===q.procType&&!q.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
345 -c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
346 -function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,p){var h=32===a.length?3:9;p=3===h?p?[30,-2,-2]:[0,32,2]:p?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],q=b[1];b=(e>>>4^q)&252645135;q^=b;e^=b<<4;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(e>>>1^q)&1431655765;for(var q=q^b,e=e^b<<1,e=e<<1|e>>>31,q=q<<1|q>>>31,J=0;J<h;J+=3){for(var B=p[J+1],r=p[J+2],N=p[J];N!=B;N+=r){var U=q^a[N],L=(q>>>4|q<<28)^a[N+1];b=e;
347 -e=q;q=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|D[U&63]|l[L>>>24&63]|m[L>>>16&63]|g[L>>>8&63]|v[L&63])}b=e;e=q;q=b}e=e>>>1|e<<31;q=q>>>1|q<<31;b=(e>>>1^q)&1431655765;q^=b;e^=b<<1;b=(q>>>8^e)&16711935;e^=b;q^=b<<8;b=(q>>>2^e)&858993459;e^=b;q^=b<<2;b=(e>>>16^q)&65535;q^=b;e^=b<<16;b=(e>>>4^q)&252645135;c[0]=e^b<<4;c[1]=q^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var h=d.start;d.start=function(b,c){var e=
348 -null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;h.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
340 +{};if(c.defined.hmac)return c.hmac;c.defined.hmac=!0;for(var p=0;p<e.length;++p)e[p](c);return c.hmac}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/hmac",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a){for(var b=a.name+": ",d=[],q=function(a,
341 +b){return" "+b},g=0;g<a.values.length;++g)d.push(a.values[g].replace(/^(\S+\r\n)/,q));b+=d.join(",")+"\r\n";d=0;a=-1;for(g=0;g<b.length;++g,++d)if(65<d&&-1!==a)d=b[a],","===d?(++a,b=b.substr(0,a)+"\r\n "+b.substr(a)):b=b.substr(0,a)+"\r\n"+d+b.substr(a+1),d=g-a-1,a=-1,++g;else if(" "===b[g]||"\t"===b[g]||","===b[g])a=g;return b}var d=a.pem=a.pem||{};d.encode=function(b,d){d=d||{};var g="-----BEGIN "+b.type+"-----\r\n",e;b.procType&&(e={name:"Proc-Type",values:[String(b.procType.version),b.procType.type]},
342 +g+=c(e));b.contentDomain&&(e={name:"Content-Domain",values:[b.contentDomain]},g+=c(e));b.dekInfo&&(e={name:"DEK-Info",values:[b.dekInfo.algorithm]},b.dekInfo.parameters&&e.values.push(b.dekInfo.parameters),g+=c(e));if(b.headers)for(e=0;e<b.headers.length;++e)g+=c(b.headers[e]);b.procType&&(g+="\r\n");g+=a.util.encode64(b.body,d.maxline||64)+"\r\n";return g+="-----END "+b.type+"-----\r\n"};d.decode=function(b){for(var c=[],d=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,
343 +g=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,e=/\r?\n/,h;;){h=d.exec(b);if(!h)break;var p={type:h[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:a.util.decode64(h[3])};c.push(p);if(h[2]){for(var l=h[2].split(e),C=0;h&&C<l.length;){h=l[C].replace(/\s+$/,"");for(var x=C+1;x<l.length;++x){var z=l[x];if(!/\s/.test(z[0]))break;h+=z;C=x}if(h=h.match(g)){for(var x={name:h[1],values:[]},z=h[2].split(","),A=0;A<z.length;++A)x.values.push(z[A].replace(/^\s+/,""));if(p.procType)if(p.contentDomain||
344 +"Content-Domain"!==x.name)if(p.dekInfo||"DEK-Info"!==x.name)p.headers.push(x);else{if(0===x.values.length)throw Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');p.dekInfo={algorithm:z[0],parameters:z[1]||null}}else p.contentDomain=z[0]||"";else{if("Proc-Type"!==x.name)throw Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(2!==x.values.length)throw Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');
345 +p.procType={version:z[0],type:z[1]}}}++C}if("ENCRYPTED"===p.procType&&!p.dekInfo)throw Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".');}}if(0===c.length)throw Error("Invalid PEM formatted message.");return c}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);
346 +c=c||{};c.defined=c.defined||{};if(c.defined.pem)return c.pem;c.defined.pem=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pem",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){a.cipher.registerAlgorithm(b,
347 +function(){return new a.des.Algorithm(b,d)})}function d(a,b,c,q){var g=32===a.length?3:9;q=3===g?q?[30,-2,-2]:[0,32,2]:q?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var e=b[0],p=b[1];b=(e>>>4^p)&252645135;p^=b;e^=b<<4;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(e>>>1^p)&1431655765;for(var p=p^b,e=e^b<<1,e=e<<1|e>>>31,p=p<<1|p>>>31,J=0;J<g;J+=3){for(var B=q[J+1],r=q[J+2],N=q[J];N!=B;N+=r){var U=p^a[N],L=(p>>>4|p<<28)^a[N+1];b=e;
348 +e=p;p=b^(n[U>>>24&63]|k[U>>>16&63]|u[U>>>8&63]|C[U&63]|l[L>>>24&63]|m[L>>>16&63]|h[L>>>8&63]|v[L&63])}b=e;e=p;p=b}e=e>>>1|e<<31;p=p>>>1|p<<31;b=(e>>>1^p)&1431655765;p^=b;e^=b<<1;b=(p>>>8^e)&16711935;e^=b;p^=b<<8;b=(p>>>2^e)&858993459;e^=b;p^=b<<2;b=(e>>>16^p)&65535;p^=b;e^=b<<16;b=(e>>>4^p)&252645135;c[0]=e^b<<4;c[1]=p^b}function e(b){b=b||{};var c="DES-"+(b.mode||"CBC").toUpperCase(),d;d=b.decrypt?a.cipher.createDecipher(c,b.key):a.cipher.createCipher(c,b.key);var g=d.start;d.start=function(b,c){var e=
349 +null;c instanceof a.util.ByteBuffer&&(e=c,c={});c=c||{};c.output=e;c.iv=b;g.call(d,c)};return d}a.des=a.des||{};a.des.startEncrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!1,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createEncryptionCipher=function(a,b){return e({key:a,output:null,decrypt:!1,mode:b})};a.des.startDecrypting=function(a,b,c,d){a=e({key:a,output:c,decrypt:!0,mode:d||(null===b?"ECB":"CBC")});a.start(b);return a};a.des.createDecryptionCipher=function(a,b){return e({key:a,
350 output:null,decrypt:!0,mode:b})};a.des.Algorithm=function(a,b){var c=this;c.name=a;c.mode=new b({blockSize:8,cipher:{encrypt:function(a,b){return d(c._keys,a,b,!1)},decrypt:function(a,b){return d(c._keys,a,b,!0)}}});c._init=!1};a.des.Algorithm.prototype.initialize=function(b){if(!this._init){b=a.util.createBuffer(b.key);if(0===this.name.indexOf("3DES")&&24!==b.length())throw Error("Invalid Triple-DES key size: "+8*b.length());for(var c=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,
350 -516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],h=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],g=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
351 -k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],q=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
352 -8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],D=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
353 -1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,E,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();E=(G>>>4^F)&252645135;F^=E;G^=E<<4;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>2^F)&858993459;F^=E;G^=E<<2;E=(F>>>-16^G)&65535;G^=E;F^=E<<-16;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=(F>>>8^G)&16711935;G^=E;F^=E<<8;E=(G>>>1^F)&1431655765;F^=E;G^=E<<1;E=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=E,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
354 -var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|h[G>>>16&15]|g[G>>>12&15]|k[G>>>8&15]|q[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|D[F>>>8&15]|K[F>>>4&15];E=(ca>>>16^Z)&65535;B[O++]=Z^E;B[O++]=ca^E<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
351 +516,536871424,536871428,66048,66052,536936960,536936964],d=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],e=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],g=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],h=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],
352 +k=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],p=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],m=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],l=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],u=[0,268435456,8,268435464,0,268435456,
353 +8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],w=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],L=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],C=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],K=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],n=8<b.length()?3:
354 +1,B=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],O=0,D,W=0;W<n;W++){var G=b.getInt32(),F=b.getInt32();D=(G>>>4^F)&252645135;F^=D;G^=D<<4;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>2^F)&858993459;F^=D;G^=D<<2;D=(F>>>-16^G)&65535;G^=D;F^=D<<-16;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=(F>>>8^G)&16711935;G^=D;F^=D<<8;D=(G>>>1^F)&1431655765;F^=D;G^=D<<1;D=G<<8|F>>>20&240;for(var G=F<<24|F<<8&16711680|F>>>8&65280|F>>>24&240,F=D,S=0;S<v.length;++S){v[S]?(G=G<<2|G>>>26,F=F<<2|F>>>26):(G=G<<1|G>>>27,F=F<<1|F>>>27);
355 +var G=G&-15,F=F&-15,Z=c[G>>>28]|d[G>>>24&15]|e[G>>>20&15]|g[G>>>16&15]|h[G>>>12&15]|k[G>>>8&15]|p[G>>>4&15],ca=m[F>>>28]|l[F>>>24&15]|u[F>>>20&15]|w[F>>>16&15]|L[F>>>12&15]|C[F>>>8&15]|K[F>>>4&15];D=(ca>>>16^Z)&65535;B[O++]=Z^D;B[O++]=ca^D<<16}}this._keys=B;this._init=!0}};c("DES-ECB",a.cipher.modes.ecb);c("DES-CBC",a.cipher.modes.cbc);c("DES-CFB",a.cipher.modes.cfb);c("DES-OFB",a.cipher.modes.ofb);c("DES-CTR",a.cipher.modes.ctr);c("3DES-ECB",a.cipher.modes.ecb);c("3DES-CBC",a.cipher.modes.cbc);c("3DES-CFB",
356 a.cipher.modes.cfb);c("3DES-OFB",a.cipher.modes.ofb);c("3DES-CTR",a.cipher.modes.ctr);var l=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,
357 0,65540,66560,0,16842756],n=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,
358 -2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],m=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,
358 -8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],g=[256,34078976,34078720,1107296512,
359 +8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],k=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,
360 524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,
361 524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,
362 4194320,536887312,0,541081600,536870912,4194320,536887312],v=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,
362 -67108866,67110912,2048,2097154],D=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
363 -268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var q=0;q<e.length;++q)e[q](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
364 -Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,g,q){function n(){if(P>z)return q(null,x);v.start(null,
365 -null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();r=2;D()}function D(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H,++r,a.util.setImmediate(D);x+=P<z?C:C.substr(0,A);++P;n()}"function"===typeof g&&(q=g,g=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===g||"object"!==typeof g)&&(4<l.pbkdf2Sync.length||!g||"sha1"===g))return"string"!==typeof g&&(g="sha1"),c=new Buffer(c,"binary"),q?4===l.pbkdf2Sync.length?l.pbkdf2(b,
366 -c,d,k,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,g,function(a,b){if(a)return q(a);q(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,g).toString("binary");if("undefined"===typeof g||null===g)g=a.md.sha1.create();if("string"===typeof g){if(!(g in a.md.algorithms))throw Error("Unknown hash algorithm: "+g);g=a.md[g].create()}var y=g.digestLength;if(k>4294967295*y){b=Error("Derived key is too long.");
367 -if(q)return q(b);throw b;}var z=Math.ceil(k/y),A=k-(z-1)*y,v=a.hmac.create();v.start(g,b);var x="",C,H,J;if(!q){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));C=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),C=a.util.xorBytes(C,H,y),J=H;x+=P<z?C:C.substr(0,A)}return x}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
368 -typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
363 +67108866,67110912,2048,2097154],C=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,
364 +268435456,268701696]}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.des)return c.des;c.defined.des=!0;for(var p=0;p<e.length;++p)e[p](c);return c.des}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,
365 +Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/des",["require","module","./cipher","./cipherModes","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d=a.pkcs5=a.pkcs5||{},e="undefined"!==typeof process&&process.versions&&process.versions.node,l;e&&!a.disableNativeCode&&(l=c("crypto"));a.pbkdf2=d.pbkdf2=function(b,c,d,k,h,p){function n(){if(P>z)return p(null,y);v.start(null,
366 +null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();r=2;C()}function C(){if(r<=d)return v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H,++r,a.util.setImmediate(C);y+=P<z?E:E.substr(0,A);++P;n()}"function"===typeof h&&(p=h,h=null);if(e&&!a.disableNativeCode&&l.pbkdf2&&(null===h||"object"!==typeof h)&&(4<l.pbkdf2Sync.length||!h||"sha1"===h))return"string"!==typeof h&&(h="sha1"),c=new Buffer(c,"binary"),p?4===l.pbkdf2Sync.length?l.pbkdf2(b,
367 +c,d,k,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):l.pbkdf2(b,c,d,k,h,function(a,b){if(a)return p(a);p(null,b.toString("binary"))}):4===l.pbkdf2Sync.length?l.pbkdf2Sync(b,c,d,k).toString("binary"):l.pbkdf2Sync(b,c,d,k,h).toString("binary");if("undefined"===typeof h||null===h)h=a.md.sha1.create();if("string"===typeof h){if(!(h in a.md.algorithms))throw Error("Unknown hash algorithm: "+h);h=a.md[h].create()}var x=h.digestLength;if(k>4294967295*x){b=Error("Derived key is too long.");
368 +if(p)return p(b);throw b;}var z=Math.ceil(k/x),A=k-(z-1)*x,v=a.hmac.create();v.start(h,b);var y="",E,H,J;if(!p){for(var P=1;P<=z;++P){v.start(null,null);v.update(c);v.update(a.util.int32ToBytes(P));E=J=v.digest().getBytes();for(var r=2;r<=d;++r)v.start(null,null),v.update(J),H=v.digest().getBytes(),E=a.util.xorBytes(E,H,x),J=H;y+=P<z?E:E.substr(0,A)}return y}P=1;n()}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
369 +typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbkdf2)return c.pbkdf2;c.defined.pbkdf2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pbkdf2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbkdf2",["require","module",
370 "./hmac","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var d="undefined"!==typeof process&&process.versions&&process.versions.node,e=null;a.disableNativeCode||!d||process.versions["node-webkit"]||(e=c("crypto"));(a.prng=a.prng||{}).create=function(b){function c(a){if(32<=k.pools[0].messageLength)return d(),a();k.seedFile(32-k.pools[0].messageLength<<5,function(b,c){if(b)return a(b);k.collect(c);d();a()})}function d(){var a=k.plugin.md.create();
370 -a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function q(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
371 -a.util.createBuffer();if(c)for(;e.length()<b;){var h=Math.max(1,Math.min(b-e.length(),65536)/4),g=new Uint32Array(Math.floor(h));try{for(c(g),h=0;h<g.length;++h)e.putInt32(g[h])}catch(x){if(!("undefined"!==typeof QuotaExceededError&&x instanceof QuotaExceededError))throw x;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(h=16807*(c&65535),c=16807*(c>>16),h+=(c&32767)<<16,h+=c>>15,h=(h&2147483647)+(h>>31),c=h&4294967295,h=0;3>h;++h)g=c>>>(h<<3),g^=Math.floor(256*Math.random()),
372 -e.putByte(String.fromCharCode(g&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var g=Array(32),l=0;32>l;++l)g[l]=b.create();k.pools=g;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=h(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=q(h(k.key,g(k.seed)));k.seed=x(h(k.key,k.seed));
373 -a.util.setImmediate(e)}if(!d)return k.generateSync(b);var h=k.plugin.cipher,g=k.plugin.increment,q=k.plugin.formatKey,x=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,h=k.plugin.formatKey,g=k.plugin.formatSeed;k.key=null;for(var q=a.util.createBuffer();q.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var x=c(k.key,
374 -k.seed);k.generated+=x.length;q.putBytes(x);k.key=h(c(k.key,e(k.seed)));k.seed=g(c(k.key,k.seed))}return q.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,q(a))}catch(c){b(c)}},k.seedFileSync=q);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
371 +a.update(k.pools[0].digest().getBytes());k.pools[0].start();for(var b=1,c=1;32>c;++c)b=31===b?2147483648:b<<2,0===b%k.reseeds&&(a.update(k.pools[c].digest().getBytes()),k.pools[c].start());b=a.digest().getBytes();a.start();a.update(b);a=a.digest().getBytes();k.key=k.plugin.formatKey(b);k.seed=k.plugin.formatSeed(a);k.reseeds=4294967295===k.reseeds?0:k.reseeds+1;k.generated=0}function p(b){var c=null;if("undefined"!==typeof window){var d=window.crypto||window.msCrypto;d&&d.getRandomValues&&(c=function(a){return d.getRandomValues(a)})}var e=
372 +a.util.createBuffer();if(c)for(;e.length()<b;){var g=Math.max(1,Math.min(b-e.length(),65536)/4),h=new Uint32Array(Math.floor(g));try{for(c(h),g=0;g<h.length;++g)e.putInt32(h[g])}catch(y){if(!("undefined"!==typeof QuotaExceededError&&y instanceof QuotaExceededError))throw y;}}if(e.length()<b)for(c=Math.floor(65536*Math.random());e.length()<b;)for(g=16807*(c&65535),c=16807*(c>>16),g+=(c&32767)<<16,g+=c>>15,g=(g&2147483647)+(g>>31),c=g&4294967295,g=0;3>g;++g)h=c>>>(g<<3),h^=Math.floor(256*Math.random()),
373 +e.putByte(String.fromCharCode(h&255));return e.getBytes(b)}var k={plugin:b,key:null,seed:null,time:null,reseeds:0,generated:0};b=b.md;for(var h=Array(32),l=0;32>l;++l)h[l]=b.create();k.pools=h;k.pool=0;k.generate=function(b,d){function e(l){if(l)return d(l);if(m.length()>=b)return d(null,m.getBytes(b));1048575<k.generated&&(k.key=null);if(null===k.key)return a.util.nextTick(function(){c(e)});l=g(k.key,k.seed);k.generated+=l.length;m.putBytes(l);k.key=p(g(k.key,h(k.seed)));k.seed=y(g(k.key,k.seed));
374 +a.util.setImmediate(e)}if(!d)return k.generateSync(b);var g=k.plugin.cipher,h=k.plugin.increment,p=k.plugin.formatKey,y=k.plugin.formatSeed,m=a.util.createBuffer();k.key=null;e()};k.generateSync=function(b){var c=k.plugin.cipher,e=k.plugin.increment,g=k.plugin.formatKey,h=k.plugin.formatSeed;k.key=null;for(var p=a.util.createBuffer();p.length()<b;){1048575<k.generated&&(k.key=null);null===k.key&&(32<=k.pools[0].messageLength||k.collect(k.seedFileSync(32-k.pools[0].messageLength<<5)),d());var y=c(k.key,
375 +k.seed);k.generated+=y.length;p.putBytes(y);k.key=g(c(k.key,e(k.seed)));k.seed=h(c(k.key,k.seed))}return p.getBytes(b)};e?(k.seedFile=function(a,b){e.randomBytes(a,function(a,c){if(a)return b(a);b(null,c.toString())})},k.seedFileSync=function(a){return e.randomBytes(a).toString()}):(k.seedFile=function(a,b){try{b(null,p(a))}catch(c){b(c)}},k.seedFileSync=p);k.collect=function(a){for(var b=a.length,c=0;c<b;++c)k.pools[k.pool].update(a.substr(c,1)),k.pool=31===k.pool?0:k.pool+1};k.collectInt=function(a,
376 b){for(var c="",d=0;d<b;d+=8)c+=String.fromCharCode(a>>d&255);k.collect(c)};k.registerWorker=function(a){a===self?k.seedFile=function(a,b){function c(a){a=a.data;a.forge&&a.forge.prng&&(self.removeEventListener("message",c),b(a.forge.prng.err,a.forge.prng.bytes))}self.addEventListener("message",c);self.postMessage({forge:{prng:{needed:a}}})}:a.addEventListener("message",function(b){b=b.data;b.forge&&b.forge.prng&&k.seedFile(b.forge.prng.needed,function(b,c){a.postMessage({forge:{prng:{err:b,bytes:c}}})})})};
376 -return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var q=0;q<e.length;++q)e[q](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
377 +return k}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prng)return c.prng;c.defined.prng=!0;for(var p=0;p<e.length;++p)e[p](c);return c.prng}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,
378 0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prng",["require","module","./md","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.random&&a.random.getBytes||function(b){function c(){var b=a.prng.create(d);b.getBytes=function(a,c){return b.generate(a,c)};b.getBytesSync=function(a){return b.generate(a)};return b}var d={},e=Array(4),l=a.util.createBuffer();d.formatKey=function(b){var c=a.util.createBuffer(b);b=Array(4);
379 b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return a.aes._expandKey(b,!1)};d.formatSeed=function(b){var c=a.util.createBuffer(b);b=Array(4);b[0]=c.getInt32();b[1]=c.getInt32();b[2]=c.getInt32();b[3]=c.getInt32();return b};d.cipher=function(b,c){a.aes._updateBlock(b,c,e,!1);l.putInt32(e[0]);l.putInt32(e[1]);l.putInt32(e[2]);l.putInt32(e[3]);return l.getBytes()};d.increment=function(a){++a[3];return a};d.md=a.md.sha256;var m=c(),k="undefined"!==typeof process&&process.versions&&
379 -process.versions.node,g=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(g=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!g){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(D){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
380 -8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var q=0;q<e.length;++q)e[q](c);
380 +process.versions.node,h=null;if("undefined"!==typeof window){var u=window.crypto||window.msCrypto;u&&u.getRandomValues&&(h=function(a){return u.getRandomValues(a)})}if(a.disableNativeCode||!k&&!h){m.collectInt(+new Date,32);if("undefined"!==typeof navigator){var k="",n;for(n in navigator)try{"string"==typeof navigator[n]&&(k+=navigator[n])}catch(C){}m.collect(k);k=null}b&&(b().mousemove(function(a){m.collectInt(a.clientX,16);m.collectInt(a.clientY,16)}),b().keypress(function(a){m.collectInt(a.charCode,
381 +8)}))}if(a.random)for(n in m)a.random[n]=m[n];else a.random=m;a.random.createInstance=c}("undefined"!==typeof jQuery?jQuery:null)}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.random)return c.random;c.defined.random=!0;for(var p=0;p<e.length;++p)e[p](c);
382 return c.random}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/random","require module ./aes ./md ./prng ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,
383 139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,
383 -175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,h=b.length(),g=d,l=Math.ceil(g/8),g=255>>(g&7),n;for(n=h;128>n;n++)e.putByte(c[e.at(n-
384 -1)+e.at(n-h)&255]);e.setAt(128-l,c[e.at(128-l)&g]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var q=!1,g=null,l=null,n=null,v,y,z,A,B=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)B.push(b.getInt16Le());e?(v=function(a){for(z=0;4>z;z++){a[z]+=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},y=function(a){for(z=0;4>z;z++)a[z]+=B[a[(z+3)%4]&63]}):(v=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
385 -(b&65535)>>c|b<<16-c&65535;a[z]-=B[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},y=function(a){for(z=3;0<=z;z--)a[z]-=B[a[(z+3)%4]&63]});var x=null;return x={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));q=!1;g=a.util.createBuffer();l=c||new a.util.createBuffer;n=b;x.output=l},update:function(a){for(q||g.putBuffer(a);8<=g.length();){a=[[5,v],[1,y],[6,v],[1,y],[5,v]];var b=[];for(z=0;4>z;z++){var c=g.getInt16Le();null!==n&&(e?c^=n.getInt16Le():n.putInt16Le(c));
386 -b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==n&&(e?n.putInt16Le(b[z]):b[z]^=n.getInt16Le()),l.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,g,!e);else{var c=8===g.length()?8:8-g.length();g.fillWithByte(c,c)}b&&(q=!0,x.update());!e&&(b=0===g.length())&&(a?b=a(8,l,!e):(a=l.length(),c=l.at(a-1),c>a?b=!1:l.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
384 +175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],d=[1,2,3,5];a.rc2=a.rc2||{};a.rc2.expandKey=function(b,d){"string"===typeof b&&(b=a.util.createBuffer(b));d=d||128;var e=b,g=b.length(),h=d,l=Math.ceil(h/8),h=255>>(h&7),n;for(n=g;128>n;n++)e.putByte(c[e.at(n-
385 +1)+e.at(n-g)&255]);e.setAt(128-l,c[e.at(128-l)&h]);for(n=127-l;0<=n;n--)e.setAt(n,c[e.at(n+1)^e.at(n+l)]);return e};var e=function(b,c,e){var k=!1,h=null,p=null,l=null,n,x,z,A,v=[];b=a.rc2.expandKey(b,c);for(z=0;64>z;z++)v.push(b.getInt16Le());e?(n=function(a){for(z=0;4>z;z++){a[z]+=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);var b=a[z],c=d[z];a[z]=b<<c&65535|(b&65535)>>16-c;A++}},x=function(a){for(z=0;4>z;z++)a[z]+=v[a[(z+3)%4]&63]}):(n=function(a){for(z=3;0<=z;z--){var b=a[z],c=d[z];a[z]=
386 +(b&65535)>>c|b<<16-c&65535;a[z]-=v[A]+(a[(z+3)%4]&a[(z+2)%4])+(~a[(z+3)%4]&a[(z+1)%4]);A--}},x=function(a){for(z=3;0<=z;z--)a[z]-=v[a[(z+3)%4]&63]});var y=null;return y={start:function(b,c){b&&"string"===typeof b&&(b=a.util.createBuffer(b));k=!1;h=a.util.createBuffer();p=c||new a.util.createBuffer;l=b;y.output=p},update:function(a){for(k||h.putBuffer(a);8<=h.length();){a=[[5,n],[1,x],[6,n],[1,x],[5,n]];var b=[];for(z=0;4>z;z++){var c=h.getInt16Le();null!==l&&(e?c^=l.getInt16Le():l.putInt16Le(c));
387 +b.push(c&65535)}A=e?0:63;for(c=0;c<a.length;c++)for(var d=0;d<a[c][0];d++)a[c][1](b);for(z=0;4>z;z++)null!==l&&(e?l.putInt16Le(b[z]):b[z]^=l.getInt16Le()),p.putInt16Le(b[z])}},finish:function(a){var b=!0;if(e)if(a)b=a(8,h,!e);else{var c=8===h.length()?8:8-h.length();h.fillWithByte(c,c)}b&&(k=!0,y.update());!e&&(b=0===h.length())&&(a?b=a(8,p,!e):(a=p.length(),c=p.at(a-1),c>a?b=!1:p.truncate(c)));return b}}};a.rc2.startEncrypting=function(b,c,d){b=a.rc2.createEncryptionCipher(b,128);b.start(c,d);return b};
388 a.rc2.createEncryptionCipher=function(a,b){return e(a,b,!0)};a.rc2.startDecrypting=function(b,c,d){b=a.rc2.createDecryptionCipher(b,128);b.start(c,d);return b};a.rc2.createDecryptionCipher=function(a,b){return e(a,b,!1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
388 -{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var q=0;q<e.length;++q)e[q](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
389 -this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,p,x){for(;0<=--x;){var h=b*this.data[a++]+c.data[d]+p;p=Math.floor(h/67108864);c.data[d++]=h&67108863}return p}function l(a,b,c,d,p,e){var x=b&32767;for(b>>=15;0<=--e;){var h=this.data[a]&32767,g=this.data[a++]>>15,k=b*h+g*x,h=x*h+((k&32767)<<15)+c.data[d]+(p&1073741823);p=(h>>>30)+(k>>>15)+b*g+(p>>>30);c.data[d++]=h&1073741823}return p}function n(a,b,
390 -c,d,p,e){var x=b&16383;for(b>>=14;0<=--e;){var h=this.data[a]&16383,g=this.data[a++]>>14,k=b*h+g*x,h=x*h+((k&16383)<<14)+c.data[d]+p;p=(h>>28)+(k>>14)+b*g;c.data[d++]=h&268435455}return p}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function g(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
391 -this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function D(a,b){return a&b}function y(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function x(a){return a}function C(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
389 +{};if(c.defined.rc2)return c.rc2;c.defined.rc2=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rc2}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rc2",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d){this.data=[];null!=a&&("number"==typeof a?
390 +this.fromNumber(a,b,d):null==b&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function d(){return new c(null)}function e(a,b,c,d,q,h){for(;0<=--h;){var g=b*this.data[a++]+c.data[d]+q;q=Math.floor(g/67108864);c.data[d++]=g&67108863}return q}function l(a,b,c,d,q,e){var h=b&32767;for(b>>=15;0<=--e;){var g=this.data[a]&32767,y=this.data[a++]>>15,k=b*g+y*h,g=h*g+((k&32767)<<15)+c.data[d]+(q&1073741823);q=(g>>>30)+(k>>>15)+b*y+(q>>>30);c.data[d++]=g&1073741823}return q}function n(a,b,
391 +c,d,q,e){var h=b&16383;for(b>>=14;0<=--e;){var g=this.data[a]&16383,y=this.data[a++]>>14,k=b*g+y*h,g=h*g+((k&16383)<<14)+c.data[d]+q;q=(g>>28)+(k>>14)+b*y;c.data[d++]=g&268435455}return q}function m(a,b){var c=P[a.charCodeAt(b)];return null==c?-1:c}function k(a){var b=d();b.fromInt(a);return b}function h(a){var b=1,c;0!=(c=a>>>16)&&(a=c,b+=16);0!=(c=a>>8)&&(a=c,b+=8);0!=(c=a>>4)&&(a=c,b+=4);0!=(c=a>>2)&&(a=c,b+=2);0!=a>>1&&(b+=1);return b}function u(a){this.m=a}function v(a){this.m=a;this.mp=a.invDigit();
392 +this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}function C(a,b){return a&b}function x(a,b){return a|b}function z(a,b){return a^b}function A(a,b){return a&~b}function R(){}function y(a){return a}function E(a){this.r2=d();this.q3=d();c.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function H(){return{nextBytes:function(a){for(var b=0;b<a.length;++b)a[b]=Math.floor(256*Math.random())}}}var J;"undefined"===typeof navigator?(c.prototype.am=n,J=28):"Microsoft Internet Explorer"==
393 navigator.appName?(c.prototype.am=l,J=30):"Netscape"!=navigator.appName?(c.prototype.am=e,J=26):(c.prototype.am=n,J=28);c.prototype.DB=J;c.prototype.DM=(1<<J)-1;c.prototype.DV=1<<J;c.prototype.FV=Math.pow(2,52);c.prototype.F1=52-J;c.prototype.F2=2*J-52;var P=[],r;J=48;for(r=0;9>=r;++r)P[J++]=r;J=97;for(r=10;36>r;++r)P[J++]=r;J=65;for(r=10;36>r;++r)P[J++]=r;u.prototype.convert=function(a){return 0>a.s||0<=a.compareTo(this.m)?a.mod(this.m):a};u.prototype.revert=function(a){return a};u.prototype.reduce=
394 function(a){a.divRemTo(this.m,null,a)};u.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};u.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};v.prototype.convert=function(a){var b=d();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);0>a.s&&0<b.compareTo(c.ZERO)&&this.m.subTo(b,b);return b};v.prototype.revert=function(a){var b=d();a.copyTo(b);this.reduce(b);return b};v.prototype.reduce=function(a){for(;a.t<=this.mt2;)a.data[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=
395 a.data[b]&32767,d=c*this.mpl+((c*this.mph+(a.data[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a.data[c]+=this.m.am(0,d,a,b,0,this.m.t);a.data[c]>=a.DV;)a.data[c]-=a.DV,a.data[++c]++}a.clamp();a.drShiftTo(this.m.t,a);0<=a.compareTo(this.m)&&a.subTo(this.m,a)};v.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};v.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};c.prototype.copyTo=function(a){for(var b=this.t-1;0<=b;--b)a.data[b]=this.data[b];a.t=this.t;a.s=this.s};
395 -c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var p=a.length,e=!1,x=0;0<=--p;){var h=8==d?a[p]&255:m(a,p);0>h?"-"==a.charAt(p)&&(e=!0):(e=!1,0==x?this.data[this.t++]=h:x+d>this.DB?(this.data[this.t-1]|=(h&(1<<this.DB-x)-1)<<x,this.data[this.t++]=
396 -h>>this.DB-x):this.data[this.t-1]|=h<<x,x+=d,x>=this.DB&&(x-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<x&&(this.data[this.t-1]|=(1<<this.DB-x)-1<<x));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
397 -a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,p=(1<<d)-1,e=Math.floor(a/this.DB),x=this.s<<c&this.DM,h;for(h=this.t-1;0<=h;--h)b.data[h+e+1]=this.data[h]>>d|x,x=(this.data[h]&p)<<c;for(h=e-1;0<=h;--h)b.data[h]=0;b.data[e]=x;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,p=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var x=
398 -c+1;x<this.t;++x)b.data[x-c-1]|=(this.data[x]&e)<<p,b.data[x-c]=this.data[x]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<p);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
399 -(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),p=a.abs(),e=d.t;for(b.t=e+p.t;0<=--e;)b.data[e]=0;for(e=0;e<p.t;++e)b.data[e+d.t]=d.am(0,p.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
400 -1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,p){var e=a.abs();if(!(0>=e.t)){var x=this.abs();if(x.t<e.t)null!=b&&b.fromInt(0),null!=p&&this.copyTo(p);else{null==p&&(p=d());var k=d(),l=this.s;a=a.s;var m=this.DB-g(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),x.lShiftTo(m,p)):(e.copyTo(k),x.copyTo(p));e=k.t;x=k.data[e-1];if(0!=x){var C=x*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/C,C=(1<<this.F1)/C,A=1<<this.F2,u=p.t,y=u-e,H=null==b?d():b;k.dlShiftTo(y,H);0<=p.compareTo(H)&&
401 -(p.data[p.t++]=1,p.subTo(H,p));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--y;){var w=p.data[--u]==x?this.DM:Math.floor(p.data[u]*r+(p.data[u-1]+A)*C);if((p.data[u]+=k.am(0,w,p,y,0,e))<w)for(k.dlShiftTo(y,H),p.subTo(H,p);p.data[u]<--w;)p.subTo(H,p)}null!=b&&(p.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));p.t=e;p.clamp();0<m&&p.rShiftTo(m,p);0>l&&c.ZERO.subTo(p,p)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
402 -(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var p=d(),e=d(),x=b.convert(this),k=g(a)-1;for(x.copyTo(p);0<=--k;)if(b.sqrTo(p,e),0<(a&1<<k))b.mulTo(e,x,p);else var l=p,p=e,e=l;return b.revert(p)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
403 -4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,p="",e=this.t,x=this.DB-e*this.DB%a;if(0<e--)for(x<this.DB&&0<(c=this.data[e]>>x)&&(d=!0,p="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)x<a?(c=(this.data[e]&(1<<x)-1)<<a-x,c|=this.data[--e]>>(x+=this.DB-a)):(c=this.data[e]>>(x-=a)&b,0>=x&&(x+=this.DB,--e)),0<c&&(d=!0),d&&(p+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?p:"0"};c.prototype.negate=function(){var a=
404 -d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+g(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
405 -b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=x;R.prototype.revert=x;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};C.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};C.prototype.revert=function(a){return a};C.prototype.reduce=function(a){a.drShiftTo(this.m.t-
406 -1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};C.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};C.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
396 +c.prototype.fromInt=function(a){this.t=1;this.s=0>a?-1:0;0<a?this.data[0]=a:-1>a?this.data[0]=a+this.DV:this.t=0};c.prototype.fromString=function(a,b){var d;if(16==b)d=4;else if(8==b)d=3;else if(256==b)d=8;else if(2==b)d=1;else if(32==b)d=5;else if(4==b)d=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var q=a.length,e=!1,h=0;0<=--q;){var g=8==d?a[q]&255:m(a,q);0>g?"-"==a.charAt(q)&&(e=!0):(e=!1,0==h?this.data[this.t++]=g:h+d>this.DB?(this.data[this.t-1]|=(g&(1<<this.DB-h)-1)<<h,this.data[this.t++]=
397 +g>>this.DB-h):this.data[this.t-1]|=g<<h,h+=d,h>=this.DB&&(h-=this.DB))}8==d&&0!=(a[0]&128)&&(this.s=-1,0<h&&(this.data[this.t-1]|=(1<<this.DB-h)-1<<h));this.clamp();e&&c.ZERO.subTo(this,this)};c.prototype.clamp=function(){for(var a=this.s&this.DM;0<this.t&&this.data[this.t-1]==a;)--this.t};c.prototype.dlShiftTo=function(a,b){var c;for(c=this.t-1;0<=c;--c)b.data[c+a]=this.data[c];for(c=a-1;0<=c;--c)b.data[c]=0;b.t=this.t+a;b.s=this.s};c.prototype.drShiftTo=function(a,b){for(var c=a;c<this.t;++c)b.data[c-
398 +a]=this.data[c];b.t=Math.max(this.t-a,0);b.s=this.s};c.prototype.lShiftTo=function(a,b){var c=a%this.DB,d=this.DB-c,q=(1<<d)-1,e=Math.floor(a/this.DB),h=this.s<<c&this.DM,g;for(g=this.t-1;0<=g;--g)b.data[g+e+1]=this.data[g]>>d|h,h=(this.data[g]&q)<<c;for(g=e-1;0<=g;--g)b.data[g]=0;b.data[e]=h;b.t=this.t+e+1;b.s=this.s;b.clamp()};c.prototype.rShiftTo=function(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,q=this.DB-d,e=(1<<d)-1;b.data[0]=this.data[c]>>d;for(var h=
399 +c+1;h<this.t;++h)b.data[h-c-1]|=(this.data[h]&e)<<q,b.data[h-c]=this.data[h]>>d;0<d&&(b.data[this.t-c-1]|=(this.s&e)<<q);b.t=this.t-c;b.clamp()}};c.prototype.subTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]-a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=0>d?-1:0;-1>d?b.data[c++]=this.DV+d:0<d&&
400 +(b.data[c++]=d);b.t=c;b.clamp()};c.prototype.multiplyTo=function(a,b){var d=this.abs(),q=a.abs(),e=d.t;for(b.t=e+q.t;0<=--e;)b.data[e]=0;for(e=0;e<q.t;++e)b.data[e+d.t]=d.am(0,q.data[e],b,e,0,d.t);b.s=0;b.clamp();this.s!=a.s&&c.ZERO.subTo(b,b)};c.prototype.squareTo=function(a){for(var b=this.abs(),c=a.t=2*b.t;0<=--c;)a.data[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b.data[c],a,2*c,0,1);(a.data[c+b.t]+=b.am(c+1,2*b.data[c],a,2*c+1,d,b.t-c-1))>=b.DV&&(a.data[c+b.t]-=b.DV,a.data[c+b.t+1]=1)}0<a.t&&(a.data[a.t-
401 +1]+=b.am(c,b.data[c],a,2*c,0,1));a.s=0;a.clamp()};c.prototype.divRemTo=function(a,b,q){var e=a.abs();if(!(0>=e.t)){var y=this.abs();if(y.t<e.t)null!=b&&b.fromInt(0),null!=q&&this.copyTo(q);else{null==q&&(q=d());var k=d(),l=this.s;a=a.s;var m=this.DB-h(e.data[e.t-1]);0<m?(e.lShiftTo(m,k),y.lShiftTo(m,q)):(e.copyTo(k),y.copyTo(q));e=k.t;y=k.data[e-1];if(0!=y){var E=y*(1<<this.F1)+(1<e?k.data[e-2]>>this.F2:0),r=this.FV/E,E=(1<<this.F1)/E,A=1<<this.F2,u=q.t,x=u-e,H=null==b?d():b;k.dlShiftTo(x,H);0<=q.compareTo(H)&&
402 +(q.data[q.t++]=1,q.subTo(H,q));c.ONE.dlShiftTo(e,H);for(H.subTo(k,k);k.t<e;)k.data[k.t++]=0;for(;0<=--x;){var w=q.data[--u]==y?this.DM:Math.floor(q.data[u]*r+(q.data[u-1]+A)*E);if((q.data[u]+=k.am(0,w,q,x,0,e))<w)for(k.dlShiftTo(x,H),q.subTo(H,q);q.data[u]<--w;)q.subTo(H,q)}null!=b&&(q.drShiftTo(e,b),l!=a&&c.ZERO.subTo(b,b));q.t=e;q.clamp();0<m&&q.rShiftTo(m,q);0>l&&c.ZERO.subTo(q,q)}}}};c.prototype.invDigit=function(){if(1>this.t)return 0;var a=this.data[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-
403 +(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return 0<b?this.DV-b:-b};c.prototype.isEven=function(){return 0==(0<this.t?this.data[0]&1:this.s)};c.prototype.exp=function(a,b){if(4294967295<a||1>a)return c.ONE;var q=d(),e=d(),y=b.convert(this),k=h(a)-1;for(y.copyTo(q);0<=--k;)if(b.sqrTo(q,e),0<(a&1<<k))b.mulTo(e,y,q);else var l=q,q=e,e=l;return b.revert(q)};c.prototype.toString=function(a){if(0>this.s)return"-"+this.negate().toString(a);if(16==a)a=
404 +4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,q="",e=this.t,h=this.DB-e*this.DB%a;if(0<e--)for(h<this.DB&&0<(c=this.data[e]>>h)&&(d=!0,q="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));0<=e;)h<a?(c=(this.data[e]&(1<<h)-1)<<a-h,c|=this.data[--e]>>(h+=this.DB-a)):(c=this.data[e]>>(h-=a)&b,0>=h&&(h+=this.DB,--e)),0<c&&(d=!0),d&&(q+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c));return d?q:"0"};c.prototype.negate=function(){var a=
405 +d();c.ZERO.subTo(this,a);return a};c.prototype.abs=function(){return 0>this.s?this.negate():this};c.prototype.compareTo=function(a){var b=this.s-a.s;if(0!=b)return b;var c=this.t,b=c-a.t;if(0!=b)return 0>this.s?-b:b;for(;0<=--c;)if(0!=(b=this.data[c]-a.data[c]))return b;return 0};c.prototype.bitLength=function(){return 0>=this.t?0:this.DB*(this.t-1)+h(this.data[this.t-1]^this.s&this.DM)};c.prototype.mod=function(a){var b=d();this.abs().divRemTo(a,null,b);0>this.s&&0<b.compareTo(c.ZERO)&&a.subTo(b,
406 +b);return b};c.prototype.modPowInt=function(a,b){var c;c=256>a||b.isEven()?new u(b):new v(b);return this.exp(a,c)};c.ZERO=k(0);c.ONE=k(1);R.prototype.convert=y;R.prototype.revert=y;R.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c)};R.prototype.sqrTo=function(a,b){a.squareTo(b)};E.prototype.convert=function(a){if(0>a.s||a.t>2*this.m.t)return a.mod(this.m);if(0>a.compareTo(this.m))return a;var b=d();a.copyTo(b);this.reduce(b);return b};E.prototype.revert=function(a){return a};E.prototype.reduce=function(a){a.drShiftTo(this.m.t-
407 +1,this.r2);a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp());this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);0>a.compareTo(this.r2);)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);0<=a.compareTo(this.m);)a.subTo(this.m,a)};E.prototype.mulTo=function(a,b,c){a.multiplyTo(b,c);this.reduce(c)};E.prototype.sqrTo=function(a,b){a.squareTo(b);this.reduce(b)};var N=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,
408 113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],U=67108864/N[N.length-1];c.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))};c.prototype.toRadix=function(a){null==a&&(a=10);if(0==this.signum()||2>a||36<a)return"0";var b=this.chunkSize(a),b=Math.pow(a,
408 -b),c=k(b),p=d(),e=d(),x="";for(this.divRemTo(c,p,e);0<p.signum();)x=(b+e.intValue()).toString(a).substr(1)+x,p.divRemTo(c,p,e);return e.intValue().toString(a)+x};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),p=Math.pow(b,d),e=!1,x=0,h=0,g=0;g<a.length;++g){var k=m(a,g);0>k?"-"==a.charAt(g)&&0==this.signum()&&(e=!0):(h=b*h+k,++x>=d&&(this.dMultiply(p),this.dAddOffset(h,0),h=x=0))}0<x&&(this.dMultiply(Math.pow(b,x)),this.dAddOffset(h,0));e&&c.ZERO.subTo(this,
409 -this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var p=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<p?d[0]&(1<<p)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,p,e=Math.min(a.t,this.t);for(d=
410 -0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){p=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],p);c.t=this.t}else{p=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(p,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,p=Math.min(a.t,this.t);c<p;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
409 +b),c=k(b),q=d(),e=d(),h="";for(this.divRemTo(c,q,e);0<q.signum();)h=(b+e.intValue()).toString(a).substr(1)+h,q.divRemTo(c,q,e);return e.intValue().toString(a)+h};c.prototype.fromRadix=function(a,b){this.fromInt(0);null==b&&(b=10);for(var d=this.chunkSize(b),q=Math.pow(b,d),e=!1,h=0,g=0,y=0;y<a.length;++y){var k=m(a,y);0>k?"-"==a.charAt(y)&&0==this.signum()&&(e=!0):(g=b*g+k,++h>=d&&(this.dMultiply(q),this.dAddOffset(g,0),g=h=0))}0<h&&(this.dMultiply(Math.pow(b,h)),this.dAddOffset(g,0));e&&c.ZERO.subTo(this,
410 +this)};c.prototype.fromNumber=function(a,b,d){if("number"==typeof b)if(2>a)this.fromInt(1);else for(this.fromNumber(a,d),this.testBit(a-1)||this.bitwiseTo(c.ONE.shiftLeft(a-1),x,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(c.ONE.shiftLeft(a-1),this);else{d=[];var q=a&7;d.length=(a>>3)+1;b.nextBytes(d);d[0]=0<q?d[0]&(1<<q)-1:0;this.fromString(d,256)}};c.prototype.bitwiseTo=function(a,b,c){var d,q,e=Math.min(a.t,this.t);for(d=
411 +0;d<e;++d)c.data[d]=b(this.data[d],a.data[d]);if(a.t<this.t){q=a.s&this.DM;for(d=e;d<this.t;++d)c.data[d]=b(this.data[d],q);c.t=this.t}else{q=this.s&this.DM;for(d=e;d<a.t;++d)c.data[d]=b(q,a.data[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()};c.prototype.changeBit=function(a,b){var d=c.ONE.shiftLeft(a);this.bitwiseTo(d,b,d);return d};c.prototype.addTo=function(a,b){for(var c=0,d=0,q=Math.min(a.t,this.t);c<q;)d+=this.data[c]+a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=
412 this.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a.data[c],b.data[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=0>d?-1:0;0<d?b.data[c++]=d:-1>d&&(b.data[c++]=this.DV+d);b.t=c;b.clamp()};c.prototype.dMultiply=function(a){this.data[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()};c.prototype.dAddOffset=function(a,b){if(0!=a){for(;this.t<=b;)this.data[this.t++]=0;for(this.data[b]+=a;this.data[b]>=this.DV;)this.data[b]-=this.DV,++b>=this.t&&(this.data[this.t++]=
412 -0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var p;for(p=c.t-this.t;d<p;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(p=Math.min(a.t,b);d<p;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
413 -c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var p=b.shiftRight(d),e=H(),x,h=0;h<a;++h){do x=new c(this.bitLength(),e);while(0>=x.compareTo(c.ONE)||0<=x.compareTo(b));x=x.modPow(p,this);if(0!=x.compareTo(c.ONE)&&0!=x.compareTo(b)){for(var g=1;g++<d&&0!=
414 -x.compareTo(b);)if(x=x.modPowInt(2,this),0==x.compareTo(c.ONE))return!1;if(0!=x.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
415 -function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,p=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[p++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==p&&
416 -(this.s&128)!=(d&128)&&++p,0<p||d!=this.s)b[p++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,D,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,y,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
413 +0),++this.data[b]}};c.prototype.multiplyLowerTo=function(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;0<d;)c.data[--d]=0;var q;for(q=c.t-this.t;d<q;++d)c.data[d+this.t]=this.am(0,a.data[d],c,d,0,this.t);for(q=Math.min(a.t,b);d<q;++d)this.am(0,a.data[d],c,d,0,b-d);c.clamp()};c.prototype.multiplyUpperTo=function(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;0<=--d;)c.data[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c.data[this.t+d-b]=this.am(b-d,a.data[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,
414 +c)};c.prototype.modInt=function(a){if(0>=a)return 0;var b=this.DV%a,c=0>this.s?a-1:0;if(0<this.t)if(0==b)c=this.data[0]%a;else for(var d=this.t-1;0<=d;--d)c=(b*c+this.data[d])%a;return c};c.prototype.millerRabin=function(a){var b=this.subtract(c.ONE),d=b.getLowestSetBit();if(0>=d)return!1;for(var q=b.shiftRight(d),e=H(),h,g=0;g<a;++g){do h=new c(this.bitLength(),e);while(0>=h.compareTo(c.ONE)||0<=h.compareTo(b));h=h.modPow(q,this);if(0!=h.compareTo(c.ONE)&&0!=h.compareTo(b)){for(var y=1;y++<d&&0!=
415 +h.compareTo(b);)if(h=h.modPowInt(2,this),0==h.compareTo(c.ONE))return!1;if(0!=h.compareTo(b))return!1}}return!0};c.prototype.clone=function(){var a=d();this.copyTo(a);return a};c.prototype.intValue=function(){if(0>this.s){if(1==this.t)return this.data[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this.data[0];if(0==this.t)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]};c.prototype.byteValue=function(){return 0==this.t?this.s:this.data[0]<<24>>24};c.prototype.shortValue=
416 +function(){return 0==this.t?this.s:this.data[0]<<16>>16};c.prototype.signum=function(){return 0>this.s?-1:0>=this.t||1==this.t&&0>=this.data[0]?0:1};c.prototype.toByteArray=function(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,q=0;if(0<a--)for(c<this.DB&&(d=this.data[a]>>c)!=(this.s&this.DM)>>c&&(b[q++]=d|this.s<<this.DB-c);0<=a;)if(8>c?(d=(this.data[a]&(1<<c)-1)<<8-c,d|=this.data[--a]>>(c+=this.DB-8)):(d=this.data[a]>>(c-=8)&255,0>=c&&(c+=this.DB,--a)),0!=(d&128)&&(d|=-256),0==q&&
417 +(this.s&128)!=(d&128)&&++q,0<q||d!=this.s)b[q++]=d;return b};c.prototype.equals=function(a){return 0==this.compareTo(a)};c.prototype.min=function(a){return 0>this.compareTo(a)?this:a};c.prototype.max=function(a){return 0<this.compareTo(a)?this:a};c.prototype.and=function(a){var b=d();this.bitwiseTo(a,C,b);return b};c.prototype.or=function(a){var b=d();this.bitwiseTo(a,x,b);return b};c.prototype.xor=function(a){var b=d();this.bitwiseTo(a,z,b);return b};c.prototype.andNot=function(a){var b=d();this.bitwiseTo(a,
418 A,b);return b};c.prototype.not=function(){for(var a=d(),b=0;b<this.t;++b)a.data[b]=this.DM&~this.data[b];a.t=this.t;a.s=~this.s;return a};c.prototype.shiftLeft=function(a){var b=d();0>a?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b};c.prototype.shiftRight=function(a){var b=d();0>a?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b};c.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(0!=this.data[a]){var b=a*this.DB;a=this.data[a];if(0==a)a=-1;else{var c=0;0==(a&65535)&&(a>>=16,c+=16);
418 -0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,p=0;0!=d;)d&=d-1,++p;a+=p}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,y)};c.prototype.clearBit=function(a){return this.changeBit(a,
419 +0==(a&255)&&(a>>=8,c+=8);0==(a&15)&&(a>>=4,c+=4);0==(a&3)&&(a>>=2,c+=2);0==(a&1)&&++c;a=c}return b+a}return 0>this.s?this.t*this.DB:-1};c.prototype.bitCount=function(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c){for(var d=this.data[c]^b,q=0;0!=d;)d&=d-1,++q;a+=q}return a};c.prototype.testBit=function(a){var b=Math.floor(a/this.DB);return b>=this.t?0!=this.s:0!=(this.data[b]&1<<a%this.DB)};c.prototype.setBit=function(a){return this.changeBit(a,x)};c.prototype.clearBit=function(a){return this.changeBit(a,
420 A)};c.prototype.flipBit=function(a){return this.changeBit(a,z)};c.prototype.add=function(a){var b=d();this.addTo(a,b);return b};c.prototype.subtract=function(a){var b=d();this.subTo(a,b);return b};c.prototype.multiply=function(a){var b=d();this.multiplyTo(a,b);return b};c.prototype.divide=function(a){var b=d();this.divRemTo(a,b,null);return b};c.prototype.remainder=function(a){var b=d();this.divRemTo(a,null,b);return b};c.prototype.divideAndRemainder=function(a){var b=d(),c=d();this.divRemTo(a,b,
420 -c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),p,e=k(1),x;if(0>=c)return e;p=18>c?1:48>c?3:144>c?4:768>c?5:6;x=8>c?new u(b):b.isEven()?new C(b):new v(b);var q=[],l=3,m=p-1,r=(1<<p)-1;q[1]=x.convert(this);if(1<p)for(c=d(),x.sqrTo(q[1],c);l<=r;)q[l]=d(),x.mulTo(c,q[l-2],q[l]),l+=2;for(var A=a.t-1,y,H=!0,w=d(),c=g(a.data[A])-1;0<=A;){c>=m?y=a.data[A]>>c-m&r:(y=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(y|=a.data[A-1]>>this.DB+c-m));for(l=p;0==(y&1);)y>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
421 -if(H)q[y].copyTo(e),H=!1;else{for(;1<l;)x.sqrTo(e,w),x.sqrTo(w,e),l-=2;0<l?x.sqrTo(e,w):(l=e,e=w,w=l);x.mulTo(w,q[y],e)}for(;0<=A&&0==(a.data[A]&1<<c);)x.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return x.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),p=this.clone(),e=k(1),x=k(0),h=k(0),g=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&x.isEven()||(e.addTo(this,e),x.subTo(a,x)),e.rShiftTo(1,
422 -e)):x.isEven()||x.subTo(a,x),x.rShiftTo(1,x);for(;p.isEven();)p.rShiftTo(1,p),b?(h.isEven()&&g.isEven()||(h.addTo(this,h),g.subTo(a,g)),h.rShiftTo(1,h)):g.isEven()||g.subTo(a,g),g.rShiftTo(1,g);0<=d.compareTo(p)?(d.subTo(p,d),b&&e.subTo(h,e),x.subTo(g,x)):(p.subTo(d,p),b&&h.subTo(e,h),g.subTo(x,g))}if(0!=p.compareTo(c.ONE))return c.ZERO;if(0<=g.compareTo(a))return g.subtract(a);if(0>g.signum())g.addTo(a,g);else return g;return 0>g.signum()?g.add(a):g};c.prototype.pow=function(a){return this.exp(a,
421 +c);return[b,c]};c.prototype.modPow=function(a,b){var c=a.bitLength(),q,e=k(1),y;if(0>=c)return e;q=18>c?1:48>c?3:144>c?4:768>c?5:6;y=8>c?new u(b):b.isEven()?new E(b):new v(b);var p=[],l=3,m=q-1,r=(1<<q)-1;p[1]=y.convert(this);if(1<q)for(c=d(),y.sqrTo(p[1],c);l<=r;)p[l]=d(),y.mulTo(c,p[l-2],p[l]),l+=2;for(var A=a.t-1,x,H=!0,w=d(),c=h(a.data[A])-1;0<=A;){c>=m?x=a.data[A]>>c-m&r:(x=(a.data[A]&(1<<c+1)-1)<<m-c,0<A&&(x|=a.data[A-1]>>this.DB+c-m));for(l=q;0==(x&1);)x>>=1,--l;0>(c-=l)&&(c+=this.DB,--A);
422 +if(H)p[x].copyTo(e),H=!1;else{for(;1<l;)y.sqrTo(e,w),y.sqrTo(w,e),l-=2;0<l?y.sqrTo(e,w):(l=e,e=w,w=l);y.mulTo(w,p[x],e)}for(;0<=A&&0==(a.data[A]&1<<c);)y.sqrTo(e,w),l=e,e=w,w=l,0>--c&&(c=this.DB-1,--A)}return y.revert(e)};c.prototype.modInverse=function(a){var b=a.isEven();if(this.isEven()&&b||0==a.signum())return c.ZERO;for(var d=a.clone(),q=this.clone(),e=k(1),h=k(0),g=k(0),y=k(1);0!=d.signum();){for(;d.isEven();)d.rShiftTo(1,d),b?(e.isEven()&&h.isEven()||(e.addTo(this,e),h.subTo(a,h)),e.rShiftTo(1,
423 +e)):h.isEven()||h.subTo(a,h),h.rShiftTo(1,h);for(;q.isEven();)q.rShiftTo(1,q),b?(g.isEven()&&y.isEven()||(g.addTo(this,g),y.subTo(a,y)),g.rShiftTo(1,g)):y.isEven()||y.subTo(a,y),y.rShiftTo(1,y);0<=d.compareTo(q)?(d.subTo(q,d),b&&e.subTo(g,e),h.subTo(y,h)):(q.subTo(d,q),b&&g.subTo(e,g),y.subTo(h,y))}if(0!=q.compareTo(c.ONE))return c.ZERO;if(0<=y.compareTo(a))return y.subtract(a);if(0>y.signum())y.addTo(a,y);else return y;return 0>y.signum()?y.add(a):y};c.prototype.pow=function(a){return this.exp(a,
424 new R)};c.prototype.gcd=function(a){var b=0>this.s?this.negate():this.clone();a=0>a.s?a.negate():a.clone();if(0>b.compareTo(a)){var c=b,b=a;a=c}var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(0>d)return b;c<d&&(d=c);0<d&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;0<b.signum();)0<(c=b.getLowestSetBit())&&b.rShiftTo(c,b),0<(c=a.getLowestSetBit())&&a.rShiftTo(c,a),0<=b.compareTo(a)?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));0<d&&a.lShiftTo(d,a);return a};c.prototype.isProbablePrime=
424 -function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],p=b+1;p<N.length&&d<U;)d*=N[p++];for(d=c.modInt(d);b<p;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
425 -n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var q=0;q<e.length;++q)e[q](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
426 -0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var h="",k=Math.ceil(d/e.digestLength),g=0;g<k;++g){var q=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,g&255);e.start();e.update(b+q);h+=e.digest().getBytes()}return h.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,h,k){var g,l,n,v;"string"===typeof e?(g=e,l=h||void 0,n=k||void 0):e&&(g=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
427 -v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;g||(g="");n.update(g,"raw");g=n.digest();h="";e-=d.length;for(k=0;k<e;k++)h+="\x00";d=g.getBytes()+h+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
428 -v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,h){var k,g,l;"string"===typeof e?(k=e,g=h||void 0):e&&(k=e.label||void 0,g=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===g?g=a.md.sha1.create():g.start();l||(l=g);if(e<2*g.digestLength+
429 -2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");g.update(k,"raw");k=g.digest().getBytes();b=d.charAt(0);h=d.substring(1,g.digestLength+1);d=d.substring(1+g.digestLength);var n=c(d,g.digestLength,l);h=a.util.xorBytes(h,n,h.length);l=c(h,e-g.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,g.digestLength);l="\x00"!==b;for(b=0;b<g.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(g=b=g.digestLength;g<d.length;g++)e=d.charCodeAt(g),h=e&1^1,l|=e&(k?65534:
430 -0),k&=h,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs1}},
431 -l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,p,g){return"workers"in p?e(a,b,p,g):d(a,b,p,g)}function d(b,c,e,k){var q=l(b,c),x=0,m=n(q.bitLength());"millerRabinTests"in
432 -e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{q.bitLength()>b&&(q=l(b,c));if(q.isProbablePrime(m))return k(null,q);q.dAddOffset(g[x++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,g,q){function m(){function a(e){if(!h){--p;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return q(null,new k(g.prime,16))}x.bitLength()>b&&(x=l(b,c));g=x.toString(16);e.target.postMessage({hex:g,workLoad:u});
433 -x.dAddOffset(n,0)}}C=Math.max(1,C);for(var d=[],e=0;e<C;++e)d[e]=new Worker(v);for(var p=C,e=0;e<C;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,g,q);var x=l(b,c),C=g.workers,u=g.workLoad||100,n=30*u/8,v=g.workerScript||"forge/prime.worker.js";if(-1===C)return a.util.estimateCores(function(a,b){a&&(b=2);C=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
434 -function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,g=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
435 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var l=
436 -0;l<e.length;++l)e[l](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
437 -Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,l=a.random.getBytes(d),g=0;g<d;++g)e=l.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
438 -typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function h(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return l(a,
439 -b.q);k(b.qBits,l)})}function k(b,c){a.prime.generateProbablePrime(b,q,c)}function l(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,h()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,l)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,h()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,l)):
440 -(e=b.e.modInverse(b.phi),b.keys={privateKey:g.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:g.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var q={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(q.prng=c.prng);h()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
441 -150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var g=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
442 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},D={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
425 +function(a){var b,c=this.abs();if(1==c.t&&c.data[0]<=N[N.length-1]){for(b=0;b<N.length;++b)if(c.data[0]==N[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<N.length;){for(var d=N[b],q=b+1;q<N.length&&d<U;)d*=N[q++];for(d=c.modInt(d);b<q;)if(0==d%N[b++])return!1}return c.millerRabin(a)};a.jsbn=a.jsbn||{};a.jsbn.BigInteger=c}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
426 +n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.jsbn)return c.jsbn;c.defined.jsbn=!0;for(var p=0;p<e.length;++p)e[p](c);return c.jsbn}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/jsbn",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,
427 +0))})})();(function(){function b(a){function c(b,d,e){e||(e=a.md.sha1.create());for(var g="",k=Math.ceil(d/e.digestLength),h=0;h<k;++h){var p=String.fromCharCode(h>>24&255,h>>16&255,h>>8&255,h&255);e.start();e.update(b+p);g+=e.digest().getBytes()}return g.substring(0,d)}var d=a.pkcs1=a.pkcs1||{};d.encode_rsa_oaep=function(b,d,e,g,k){var h,l,n,v;"string"===typeof e?(h=e,l=g||void 0,n=k||void 0):e&&(h=e.label||void 0,l=e.seed||void 0,n=e.md||void 0,e.mgf1&&e.mgf1.md&&(v=e.mgf1.md));n?n.start():n=a.md.sha1.create();
428 +v||(v=n);b=Math.ceil(b.n.bitLength()/8);e=b-2*n.digestLength-2;if(d.length>e)throw v=Error("RSAES-OAEP input message length is too long."),v.length=d.length,v.maxLength=e,v;h||(h="");n.update(h,"raw");h=n.digest();g="";e-=d.length;for(k=0;k<e;k++)g+="\x00";d=h.getBytes()+g+"\u0001"+d;if(!l)l=a.random.getBytes(n.digestLength);else if(l.length!==n.digestLength)throw v=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length."),v.seedLength=l.length,v.digestLength=n.digestLength,
429 +v;b=c(l,b-n.digestLength-1,v);d=a.util.xorBytes(d,b,d.length);n=c(d,n.digestLength,v);return"\x00"+a.util.xorBytes(l,n,l.length)+d};d.decode_rsa_oaep=function(b,d,e,g){var k,h,l;"string"===typeof e?(k=e,h=g||void 0):e&&(k=e.label||void 0,h=e.md||void 0,e.mgf1&&e.mgf1.md&&(l=e.mgf1.md));e=Math.ceil(b.n.bitLength()/8);if(d.length!==e)throw l=Error("RSAES-OAEP encoded message length is invalid."),l.length=d.length,l.expectedLength=e,l;void 0===h?h=a.md.sha1.create():h.start();l||(l=h);if(e<2*h.digestLength+
430 +2)throw Error("RSAES-OAEP key is too short for the hash function.");k||(k="");h.update(k,"raw");k=h.digest().getBytes();b=d.charAt(0);g=d.substring(1,h.digestLength+1);d=d.substring(1+h.digestLength);var n=c(d,h.digestLength,l);g=a.util.xorBytes(g,n,g.length);l=c(g,e-h.digestLength-1,l);d=a.util.xorBytes(d,l,d.length);e=d.substring(0,h.digestLength);l="\x00"!==b;for(b=0;b<h.digestLength;++b)l|=k.charAt(b)!==e.charAt(b);k=1;for(h=b=h.digestLength;h<d.length;h++)e=d.charCodeAt(h),g=e&1^1,l|=e&(k?65534:
431 +0),k&=g,b+=k;if(l||1!==d.charCodeAt(b))throw Error("Invalid RSAES-OAEP padding.");return d.substring(b+1)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs1)return c.pkcs1;c.defined.pkcs1=!0;for(var p=0;p<e.length;++p)e[p](c);return c.pkcs1}},
432 +l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs1",["require","module","./util","./random","./sha1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,q,h){return"workers"in q?e(a,b,q,h):d(a,b,q,h)}function d(b,c,e,k){var p=l(b,c),y=0,m=n(p.bitLength());"millerRabinTests"in
433 +e&&(m=e.millerRabinTests);var u=10;"maxBlockTime"in e&&(u=e.maxBlockTime);var v=+new Date;do{p.bitLength()>b&&(p=l(b,c));if(p.isProbablePrime(m))return k(null,p);p.dAddOffset(h[y++%8],0)}while(0>u||+new Date-v<u);a.util.setImmediate(function(){d(b,c,e,k)})}function e(b,c,h,p){function m(){function a(e){if(!h){--q;var g=e.data;if(g.found){for(e=0;e<d.length;++e)d[e].terminate();h=!0;return p(null,new k(g.prime,16))}y.bitLength()>b&&(y=l(b,c));g=y.toString(16);e.target.postMessage({hex:g,workLoad:u});
434 +y.dAddOffset(n,0)}}E=Math.max(1,E);for(var d=[],e=0;e<E;++e)d[e]=new Worker(v);for(var q=E,e=0;e<E;++e)d[e].addEventListener("message",a);var h=!1}if("undefined"===typeof Worker)return d(b,c,h,p);var y=l(b,c),E=h.workers,u=h.workLoad||100,n=30*u/8,v=h.workerScript||"forge/prime.worker.js";if(-1===E)return a.util.estimateCores(function(a,b){a&&(b=2);E=b-1;m()});m()}function l(a,b){var c=new k(a,b),d=a-1;c.testBit(d)||c.bitwiseTo(k.ONE.shiftLeft(d),v,c);c.dAddOffset(31-c.mod(u).byteValue(),0);return c}
435 +function n(a){return 100>=a?27:150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if(!a.prime){var m=a.prime=a.prime||{},k=a.jsbn.BigInteger,h=[6,4,2,4,2,4,6,2],u=new k(null);u.fromInt(30);var v=function(a,b){return a|b};m.generateProbablePrime=function(b,d,e){"function"===typeof d&&(e=d,d={});d=d||{};var h=d.algorithm||"PRIMEINC";"string"===typeof h&&(h={name:h});h.options=h.options||{};var g=d.prng||a.random;d={nextBytes:function(a){for(var b=g.getBytesSync(a.length),
436 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};if("PRIMEINC"===h.name)return c(b,d,h.options,e);throw Error("Invalid prime generation algorithm: "+h.name);}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.prime)return c.prime;c.defined.prime=!0;for(var p=
437 +0;p<e.length;++p)e[p](c);return c.prime}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/prime",["require","module","./util","./jsbn","./random"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d,e){var h=a.util.createBuffer();d=Math.ceil(d.n.bitLength()/8);if(b.length>d-11)throw h=
438 +Error("Message is too long for PKCS#1 v1.5 padding."),h.length=b.length,h.max=d-11,h;h.putByte(0);h.putByte(e);d=d-3-b.length;if(0===e||1===e){e=0===e?0:255;for(var g=0;g<d;++g)h.putByte(e)}else for(;0<d;){for(var k=0,p=a.random.getBytes(d),g=0;g<d;++g)e=p.charCodeAt(g),0===e?++k:h.putByte(e);d=k}h.putByte(0);h.putBytes(b);return h}function d(b,c,e,h){c=Math.ceil(c.n.bitLength()/8);b=a.util.createBuffer(b);var g=b.getByte(),k=b.getByte();if(0!==g||e&&0!==k&&1!==k||!e&&2!=k||e&&0===k&&"undefined"===
439 +typeof h)throw Error("Encryption block is invalid.");e=0;if(0===k)for(e=c-3-h,h=0;h<e;++h){if(0!==b.getByte())throw Error("Encryption block is invalid.");}else if(1===k)for(e=0;1<b.length();){if(255!==b.getByte()){--b.read;break}++e}else if(2===k)for(e=0;1<b.length();){if(0===b.getByte()){--b.read;break}++e}if(0!==b.getByte()||e!==c-3-b.length())throw Error("Encryption block is invalid.");return b.getBytes()}function e(b,c,d){function g(){k(b.pBits,function(a,c){if(a)return d(a);b.p=c;if(null!==b.q)return p(a,
440 +b.q);k(b.qBits,p)})}function k(b,c){a.prime.generateProbablePrime(b,l,c)}function p(a,c){if(a)return d(a);b.q=c;if(0>b.p.compareTo(b.q)){var e=b.p;b.p=b.q;b.q=e}0!==b.p.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.p=null,g()):0!==b.q.subtract(m.ONE).gcd(b.e).compareTo(m.ONE)?(b.q=null,k(b.qBits,p)):(b.p1=b.p.subtract(m.ONE),b.q1=b.q.subtract(m.ONE),b.phi=b.p1.multiply(b.q1),0!==b.phi.gcd(b.e).compareTo(m.ONE)?(b.p=b.q=null,g()):(b.n=b.p.multiply(b.q),b.n.bitLength()!==b.bits?(b.q=null,k(b.qBits,p)):
441 +(e=b.e.modInverse(b.phi),b.keys={privateKey:h.rsa.setPrivateKey(b.n,b.e,e,b.p,b.q,e.mod(b.p1),e.mod(b.q1),b.q.modInverse(b.p)),publicKey:h.rsa.setPublicKey(b.n,b.e)},d(null,b.keys))))}"function"===typeof c&&(d=c,c={});c=c||{};var l={algorithm:{name:c.algorithm||"PRIMEINC",options:{workers:c.workers||2,workLoad:c.workLoad||100,workerScript:c.workerScript}}};"prng"in c&&(l.prng=c.prng);g()}function l(b){b=b.toString(16);"8"<=b[0]&&(b="00"+b);return a.util.hexToBytes(b)}function n(a){return 100>=a?27:
442 +150>=a?18:200>=a?15:250>=a?12:300>=a?9:350>=a?8:400>=a?7:500>=a?6:600>=a?5:800>=a?4:1250>=a?3:2}if("undefined"===typeof m)var m=a.jsbn.BigInteger;var k=a.asn1;a.pki=a.pki||{};a.pki.rsa=a.rsa=a.rsa||{};var h=a.pki,u=[6,4,2,4,2,4,6,2],v={name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:k.Class.UNIVERSAL,
443 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},C={name:"RSAPrivateKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",
444 tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",
444 -tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},y={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
445 +tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},x={name:"RSAPublicKey",tagClass:k.Class.UNIVERSAL,
446 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},z=a.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,
446 -type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in g.oids)b=g.oids[a.algorithm];
447 +type:k.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},A=function(a){var b;if(a.algorithm in h.oids)b=h.oids[a.algorithm];
448 else throw b=Error("Unknown message digest algorithm."),b.algorithm=a.algorithm,b;var c=k.oidToDer(b).getBytes();b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);var d=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);d.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,c));d.value.push(k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,""));a=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,a.digest().getBytes());b.value.push(d);b.value.push(a);return k.toDer(b).getBytes()},R=function(b,c,d){if(d)return b.modPow(c.e,
449 c.n);if(!c.p||!c.q)return b.modPow(c.d,c.n);c.dP||(c.dP=c.d.mod(c.p.subtract(m.ONE)));c.dQ||(c.dQ=c.d.mod(c.q.subtract(m.ONE)));c.qInv||(c.qInv=c.q.modInverse(c.p));do d=new m(a.util.bytesToHex(a.random.getBytes(c.n.bitLength()/8)),16);while(0<=d.compareTo(c.n)||!d.gcd(c.n).equals(m.ONE));b=b.multiply(d.modPow(c.e,c.n)).mod(c.n);var e=b.mod(c.p).modPow(c.dP,c.p);for(b=b.mod(c.q).modPow(c.dQ,c.q);0>e.compareTo(b);)e=e.add(c.p);b=e.subtract(b).multiply(c.qInv).mod(c.p).multiply(c.q).add(b);return b=
449 -b.multiply(d.modInverse(c.n)).mod(c.n)};g.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};g.rsa.decrypt=function(b,c,e,g){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
450 -b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var l=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)l.putByte(0),--k;l.putBytes(a.util.hexToBytes(b));return!1!==g?d(l.getBytes(),c,e):l.getBytes()};g.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
451 -c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};g.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},p=+new Date,h,k=0;null===a.keys&&
452 -(0>=b||k<b);){if(0===a.state){h=null===a.p?a.pBits:a.qBits;var l=h-1;0===a.pqState?(a.num=new m(h,a.rng),a.num.testBit(l)||a.num.bitwiseTo(m.ONE.shiftLeft(l),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>h?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
453 -null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(h=a.e.modInverse(a.phi),a.keys={privateKey:g.rsa.setPrivateKey(a.n,a.e,h,a.p,a.q,
454 -h.mod(a.p1),h.mod(a.q1),a.q.modInverse(a.p)),publicKey:g.rsa.setPublicKey(a.n,a.e)});h=+new Date;k+=h-p;p=h}return null!==a.keys};g.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
455 -c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var p=g.rsa.createKeyPairGenerationState(a,b,c);if(!d)return g.rsa.stepKeyPairGenerationState(p,0),p.keys;e(p,c,d)};g.setRsaPublicKey=g.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
456 -b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return g.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
457 -l,!0);return a===b}};b=g.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};g.setRsaPrivateKey=g.rsa.setPrivateKey=function(b,c,e,k,l,q,m,u){var y={n:b,e:c,d:e,p:k,q:l,dP:q,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=g.rsa.decrypt(b,y,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
458 -"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,y,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,y.n.bitLength());return g.rsa.encrypt(d,y,c)}};return y};g.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
459 -[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};g.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,D,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
460 -c.errors=d,c;var e,h,l,q,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();h=a.util.createBuffer(c.privateKeyPrime1).toHex();l=a.util.createBuffer(c.privateKeyPrime2).toHex();q=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return g.setRsaPrivateKey(new m(d,16),new m(b,
461 -16),new m(e,16),new m(h,16),new m(l,16),new m(q,16),new m(A,16),new m(c,16))};g.privateKeyToAsn1=g.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
462 -k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};g.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==g.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,y,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
463 -c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return g.setRsaPublicKey(new m(d,16),new m(c,16))};g.publicKeyToAsn1=g.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(g.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
464 -!1,[g.publicKeyToRSAPublicKey(a)])])};g.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
465 -{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var l=0;l<e.length;++l)e[l](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
450 +b.multiply(d.modInverse(c.n)).mod(c.n)};h.rsa.encrypt=function(b,d,e){var h=e,g=Math.ceil(d.n.bitLength()/8);!1!==e&&!0!==e?(h=2===e,e=c(b,d,e)):(e=a.util.createBuffer(),e.putBytes(b));b=new m(e.toHex(),16);d=R(b,d,h).toString(16);h=a.util.createBuffer();for(g-=Math.ceil(d.length/2);0<g;)h.putByte(0),--g;h.putBytes(a.util.hexToBytes(d));return h.getBytes()};h.rsa.decrypt=function(b,c,e,h){var k=Math.ceil(c.n.bitLength()/8);if(b.length!==k)throw c=Error("Encrypted message length is invalid."),c.length=
451 +b.length,c.expected=k,c;b=new m(a.util.createBuffer(b).toHex(),16);if(0<=b.compareTo(c.n))throw Error("Encrypted message is invalid.");b=R(b,c,e).toString(16);for(var p=a.util.createBuffer(),k=k-Math.ceil(b.length/2);0<k;)p.putByte(0),--k;p.putBytes(a.util.hexToBytes(b));return!1!==h?d(p.getBytes(),c,e):p.getBytes()};h.rsa.createKeyPairGenerationState=function(b,c,d){"string"===typeof b&&(b=parseInt(b,10));b=b||2048;d=d||{};var e=d.prng||a.random,h={nextBytes:function(a){for(var b=e.getBytesSync(a.length),
452 +c=0;c<a.length;++c)a[c]=b.charCodeAt(c)}};d=d.algorithm||"PRIMEINC";if("PRIMEINC"===d)b={algorithm:d,state:0,bits:b,rng:h,eInt:c||65537,e:new m(null),p:null,q:null,qBits:b>>1,pBits:b-(b>>1),pqState:0,num:null,keys:null},b.e.fromInt(b.eInt);else throw Error("Invalid key generation algorithm: "+d);return b};h.rsa.stepKeyPairGenerationState=function(a,b){"algorithm"in a||(a.algorithm="PRIMEINC");var c=new m(null);c.fromInt(30);for(var d=0,e=function(a,b){return a|b},q=+new Date,g,k=0;null===a.keys&&
453 +(0>=b||k<b);){if(0===a.state){g=null===a.p?a.pBits:a.qBits;var p=g-1;0===a.pqState?(a.num=new m(g,a.rng),a.num.testBit(p)||a.num.bitwiseTo(m.ONE.shiftLeft(p),e,a.num),a.num.dAddOffset(31-a.num.mod(c).byteValue(),0),d=0,++a.pqState):1===a.pqState?a.num.bitLength()>g?a.pqState=0:a.num.isProbablePrime(n(a.num.bitLength()))?++a.pqState:a.num.dAddOffset(u[d++%8],0):2===a.pqState?a.pqState=0===a.num.subtract(m.ONE).gcd(a.e).compareTo(m.ONE)?3:0:3===a.pqState&&(a.pqState=0,null===a.p?a.p=a.num:a.q=a.num,
454 +null!==a.p&&null!==a.q&&++a.state,a.num=null)}else 1===a.state?(0>a.p.compareTo(a.q)&&(a.num=a.p,a.p=a.q,a.q=a.num),++a.state):2===a.state?(a.p1=a.p.subtract(m.ONE),a.q1=a.q.subtract(m.ONE),a.phi=a.p1.multiply(a.q1),++a.state):3===a.state?0===a.phi.gcd(a.e).compareTo(m.ONE)?++a.state:(a.p=null,a.q=null,a.state=0):4===a.state?(a.n=a.p.multiply(a.q),a.n.bitLength()===a.bits?++a.state:(a.q=null,a.state=0)):5===a.state&&(g=a.e.modInverse(a.phi),a.keys={privateKey:h.rsa.setPrivateKey(a.n,a.e,g,a.p,a.q,
455 +g.mod(a.p1),g.mod(a.q1),a.q.modInverse(a.p)),publicKey:h.rsa.setPublicKey(a.n,a.e)});g=+new Date;k+=g-q;q=g}return null!==a.keys};h.rsa.generateKeyPair=function(a,b,c,d){1===arguments.length?"object"===typeof a?(c=a,a=void 0):"function"===typeof a&&(d=a,a=void 0):2===arguments.length?"number"===typeof a?"function"===typeof b?(d=b,b=void 0):"number"!==typeof b&&(c=b,b=void 0):(c=a,d=b,b=a=void 0):3===arguments.length&&("number"===typeof b?"function"===typeof c&&(d=c,c=void 0):(d=c,c=b,b=void 0));c=
456 +c||{};void 0===a&&(a=c.bits||2048);void 0===b&&(b=c.e||65537);var q=h.rsa.createKeyPairGenerationState(a,b,c);if(!d)return h.rsa.stepKeyPairGenerationState(q,0),q.keys;e(q,c,d)};h.setRsaPublicKey=h.rsa.setPublicKey=function(b,e){var l={n:b,e:e,encrypt:function(b,d,e){"string"===typeof d?d=d.toUpperCase():void 0===d&&(d="RSAES-PKCS1-V1_5");if("RSAES-PKCS1-V1_5"===d)d={encode:function(a,b,d){return c(a,b,2).getBytes()}};else if("RSA-OAEP"===d||"RSAES-OAEP"===d)d={encode:function(b,c){return a.pkcs1.encode_rsa_oaep(c,
457 +b,e)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(d))d={encode:function(a){return a}};else if("string"===typeof d)throw Error('Unsupported encryption scheme: "'+d+'".');b=d.encode(b,l,!0);return h.rsa.encrypt(b,l,!0)},verify:function(a,b,c){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSASSA-PKCS1-V1_5");if("RSASSA-PKCS1-V1_5"===c)c={verify:function(a,b){b=d(b,l,!0);var c=k.fromDer(b);return a===c.value[1].value}};else if("NONE"===c||"NULL"===c||null===c)c={verify:function(a,b){b=d(b,
458 +l,!0);return a===b}};b=h.rsa.decrypt(b,l,!0,!1);return c.verify(a,b,l.n.bitLength())}};return l};h.setRsaPrivateKey=h.rsa.setPrivateKey=function(b,c,e,k,p,l,m,u){var x={n:b,e:c,d:e,p:k,q:p,dP:l,dQ:m,qInv:u,decrypt:function(b,c,e){"string"===typeof c?c=c.toUpperCase():void 0===c&&(c="RSAES-PKCS1-V1_5");b=h.rsa.decrypt(b,x,!1,!1);if("RSAES-PKCS1-V1_5"===c)c={decode:d};else if("RSA-OAEP"===c||"RSAES-OAEP"===c)c={decode:function(b,c){return a.pkcs1.decode_rsa_oaep(c,b,e)}};else if(-1!==["RAW","NONE",
459 +"NULL",null].indexOf(c))c={decode:function(a){return a}};else throw Error('Unsupported encryption scheme: "'+c+'".');return c.decode(b,x,!1)},sign:function(a,b){var c=!1;"string"===typeof b&&(b=b.toUpperCase());if(void 0===b||"RSASSA-PKCS1-V1_5"===b)b={encode:A},c=1;else if("NONE"===b||"NULL"===b||null===b)b={encode:function(){return a}},c=1;var d=b.encode(a,x.n.bitLength());return h.rsa.encrypt(d,x,c)}};return x};h.wrapRsaPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,
460 +[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,k.toDer(a).getBytes())])};h.privateKeyFromAsn1=function(b){var c={},d=[];k.validate(b,v,c,d)&&(b=k.fromDer(a.util.createBuffer(c.privateKey)));c={};d=[];if(!k.validate(b,C,c,d))throw c=Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey."),
461 +c.errors=d,c;var e,g,p,l,A,d=a.util.createBuffer(c.privateKeyModulus).toHex();b=a.util.createBuffer(c.privateKeyPublicExponent).toHex();e=a.util.createBuffer(c.privateKeyPrivateExponent).toHex();g=a.util.createBuffer(c.privateKeyPrime1).toHex();p=a.util.createBuffer(c.privateKeyPrime2).toHex();l=a.util.createBuffer(c.privateKeyExponent1).toHex();A=a.util.createBuffer(c.privateKeyExponent2).toHex();c=a.util.createBuffer(c.privateKeyCoefficient).toHex();return h.setRsaPrivateKey(new m(d,16),new m(b,
462 +16),new m(e,16),new m(g,16),new m(p,16),new m(l,16),new m(A,16),new m(c,16))};h.privateKeyToAsn1=h.privateKeyToRSAPrivateKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(0).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.d)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.p)),k.create(k.Class.UNIVERSAL,
463 +k.Type.INTEGER,!1,l(a.q)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dP)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.dQ)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.qInv))])};h.publicKeyFromAsn1=function(b){var c={},d=[];if(k.validate(b,z,c,d)){d=k.derToOid(c.publicKeyOid);if(d!==h.oids.rsaEncryption)throw c=Error("Cannot read public key. Unknown OID."),c.oid=d,c;b=c.rsaPublicKey}d=[];if(!k.validate(b,x,c,d))throw c=Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey."),
464 +c.errors=d,c;d=a.util.createBuffer(c.publicKeyModulus).toHex();c=a.util.createBuffer(c.publicKeyExponent).toHex();return h.setRsaPublicKey(new m(d,16),new m(c,16))};h.publicKeyToAsn1=h.publicKeyToSubjectPublicKeyInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(h.oids.rsaEncryption).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
465 +!1,[h.publicKeyToRSAPublicKey(a)])])};h.publicKeyToRSAPublicKey=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.n)),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,l(a.e))])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||
466 +{};c.defined=c.defined||{};if(c.defined.rsa)return c.rsa;c.defined.rsa=!0;for(var p=0;p<e.length;++p)e[p](c);return c.rsa}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/rsa","require module ./asn1 ./jsbn ./oids ./pkcs1 ./prime ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,
467 b){return a.start().update(b).digest().getBytes()}if("undefined"===typeof d)var d=a.jsbn.BigInteger;var e=a.asn1,l=a.pki=a.pki||{};l.pbe=a.pbe=a.pbe||{};var n=l.oids,m={name:"EncryptedPrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encryptionOid"},
468 {name:"AlgorithmIdentifier.parameters",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},k={name:"PBES2Algorithms",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",
469 tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:e.Class.UNIVERSAL,
469 -type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},g={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
470 -{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),q;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var x,m;switch(d.algorithm){case "aes128":x=q=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":q=24;
471 -x=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":q=32;x=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":x=q=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,q);c=a.random.getBytesSync(x);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
470 +type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},h={name:"pkcs-12PbeParams",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"salt"},
471 +{name:"pkcs-12PbeParams.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"iterations"}]};l.encryptPrivateKeyInfo=function(b,c,d){d=d||{};d.saltSize=d.saltSize||8;d.count=d.count||2048;d.algorithm=d.algorithm||"aes128";var h=a.random.getBytesSync(d.saltSize),g=d.count,k=e.integerToDer(g),p;if(0===d.algorithm.indexOf("aes")||"des"===d.algorithm){var y,m;switch(d.algorithm){case "aes128":y=p=16;d=n["aes128-CBC"];m=a.aes.createEncryptionCipher;break;case "aes192":p=24;
472 +y=16;d=n["aes192-CBC"];m=a.aes.createEncryptionCipher;break;case "aes256":p=32;y=16;d=n["aes256-CBC"];m=a.aes.createEncryptionCipher;break;case "des":y=p=8;d=n.desCBC;m=a.des.createEncryptionCipher;break;default:throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;}var v=a.pkcs5.pbkdf2(c,h,g,p);c=a.random.getBytesSync(y);g=m(v);g.start(c);g.update(e.toDer(b));g.finish();b=g.output.getBytes();h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,
473 e.Type.OID,!1,e.oidToDer(n.pkcs5PBES2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n.pkcs5PBKDF2).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(d).getBytes()),e.create(e.Class.UNIVERSAL,
473 -e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)q=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,q),c=l.pbe.generatePkcs12Key(c,d,2,g,q),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
474 +e.Type.OCTETSTRING,!1,c)])])])}else if("3des"===d.algorithm)p=24,d=new a.util.ByteBuffer(h),v=l.pbe.generatePkcs12Key(c,d,1,g,p),c=l.pbe.generatePkcs12Key(c,d,2,g,p),g=a.des.createEncryptionCipher(v),g.start(c),g.update(e.toDer(b)),g.finish(),b=g.output.getBytes(),h=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(n["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,
475 !1,h),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,k.getBytes())])]);else throw h=Error("Cannot encrypt private key. Unknown encryption algorithm."),h.algorithm=d.algorithm,h;return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[h,e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,b)])};l.decryptPrivateKeyInfo=function(b,c){var d=null,h={},g=[];if(!e.validate(b,m,h,g))throw d=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=g,d;g=e.derToOid(h.encryptionOid);
476 g=l.pbe.getCipher(g,h.encryptionParams,c);h=a.util.createBuffer(h.encryptedData);g.update(h);g.finish()&&(d=e.fromDer(g.output));return d};l.encryptedPrivateKeyToPem=function(b,c){var d={type:"ENCRYPTED PRIVATE KEY",body:e.toDer(b).getBytes()};return a.pem.encode(d,{maxline:c})};l.encryptedPrivateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');c.headerType=
477 b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return e.fromDer(b.body)};l.encryptRsaPrivateKey=function(b,c,d){d=d||{};if(!d.legacy)return b=l.wrapRsaPrivateKey(l.privateKeyToAsn1(b)),b=l.encryptPrivateKeyInfo(b,c,d),l.encryptedPrivateKeyToPem(b);var h,g,k;switch(d.algorithm){case "aes128":d="AES-128-CBC";g=16;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes192":d="AES-192-CBC";
478 g=24;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "aes256":d="AES-256-CBC";g=32;h=a.random.getBytesSync(16);k=a.aes.createEncryptionCipher;break;case "3des":d="DES-EDE3-CBC";g=24;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;case "des":d="DES-CBC";g=8;h=a.random.getBytesSync(8);k=a.des.createEncryptionCipher;break;default:throw b=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+d.algorithm+'".'),b.algorithm=d.algorithm,b;}c=a.pbe.opensslDeriveBytes(c,
479 h.substr(0,8),g);c=k(c);c.start(h);c.update(e.toDer(l.privateKeyToAsn1(b)));c.finish();b={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:d,parameters:a.util.bytesToHex(h).toUpperCase()},body:c.output.getBytes()};return a.pem.encode(b)};l.decryptRsaPrivateKey=function(b,c){var d=null,h=a.pem.decode(b)[0];if("ENCRYPTED PRIVATE KEY"!==h.type&&"PRIVATE KEY"!==h.type&&"RSA PRIVATE KEY"!==h.type)throw d=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'),
480 d.headerType=d,d;if(h.procType&&"ENCRYPTED"===h.procType.type){var g,k;switch(h.dekInfo.algorithm){case "DES-CBC":g=8;k=a.des.createDecryptionCipher;break;case "DES-EDE3-CBC":g=24;k=a.des.createDecryptionCipher;break;case "AES-128-CBC":g=16;k=a.aes.createDecryptionCipher;break;case "AES-192-CBC":g=24;k=a.aes.createDecryptionCipher;break;case "AES-256-CBC":g=32;k=a.aes.createDecryptionCipher;break;case "RC2-40-CBC":g=5;k=function(b){return a.rc2.createDecryptionCipher(b,40)};break;case "RC2-64-CBC":g=
480 -8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var q=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,q.substr(0,8),g);k=k(g);k.start(q);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
481 -h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var q=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
482 -var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/q);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var E=new a.util.ByteBuffer;for(l=0;l<m;l++)E.putByte(B.at(l%q));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
483 -V=511;for(l=E.length()-1;0<=l;l--)V>>=8,V+=E.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
481 +8;k=function(b){return a.rc2.createDecryptionCipher(b,64)};break;case "RC2-128-CBC":g=16;k=function(b){return a.rc2.createDecryptionCipher(b,128)};break;default:throw d=Error('Could not decrypt private key; unsupported encryption algorithm "'+h.dekInfo.algorithm+'".'),d.algorithm=h.dekInfo.algorithm,d;}var p=a.util.hexToBytes(h.dekInfo.parameters);g=a.pbe.opensslDeriveBytes(c,p.substr(0,8),g);k=k(g);k.start(p);k.update(a.util.createBuffer(h.body));if(k.finish())d=k.output.getBytes();else return d}else d=
482 +h.body;d="ENCRYPTED PRIVATE KEY"===h.type?l.decryptPrivateKeyInfo(e.fromDer(d),c):e.fromDer(d);null!==d&&(d=l.privateKeyFromAsn1(d));return d};l.pbe.generatePkcs12Key=function(b,c,d,e,h,g){var k,l;if("undefined"===typeof g||null===g)g=a.md.sha1.create();var p=g.digestLength,m=g.blockLength,n=new a.util.ByteBuffer,v=new a.util.ByteBuffer;if(null!==b&&void 0!==b){for(l=0;l<b.length;l++)v.putInt16(b.charCodeAt(l));v.putInt16(0)}b=v.length();var r=c.length(),w=new a.util.ByteBuffer;w.fillWithByte(d,m);
483 +var B=m*Math.ceil(r/m);d=new a.util.ByteBuffer;for(l=0;l<B;l++)d.putByte(c.at(l%r));B=m*Math.ceil(b/m);c=new a.util.ByteBuffer;for(l=0;l<B;l++)c.putByte(v.at(l%b));v=d;v.putBuffer(c);c=Math.ceil(h/p);for(d=1;d<=c;d++){B=new a.util.ByteBuffer;B.putBytes(w.bytes());B.putBytes(v.bytes());for(l=0;l<e;l++)g.start(),g.update(B.getBytes()),B=g.digest();var D=new a.util.ByteBuffer;for(l=0;l<m;l++)D.putByte(B.at(l%p));var Y=Math.ceil(r/m)+Math.ceil(b/m),K=new a.util.ByteBuffer;for(k=0;k<Y;k++){var ea=new a.util.ByteBuffer(v.getBytes(m)),
484 +V=511;for(l=D.length()-1;0<=l;l--)V>>=8,V+=D.at(l)+ea.at(l),ea.setAt(l,V&255);K.putBuffer(ea)}v=K;n.putBuffer(B)}n.truncate(n.length()-h);return n};l.pbe.getCipher=function(a,b,c){switch(a){case l.oids.pkcs5PBES2:return l.pbe.getCipherForPBES2(a,b,c);case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case l.oids["pbewithSHAAnd40BitRC2-CBC"]:return l.pbe.getCipherForPKCS12PBE(a,b,c);default:throw b=Error("Cannot read encrypted PBE data block. Unsupported OID."),b.oid=a,b.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC",
485 "pbewithSHAAnd40BitRC2-CBC"],b;}};l.pbe.getCipherForPBES2=function(b,c,d){var h={};b=[];if(!e.validate(c,k,h,b)){var g=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");g.errors=b;throw g;}b=e.derToOid(h.kdfOid);if(b!==l.oids.pkcs5PBKDF2)throw g=Error("Cannot read encrypted private key. Unsupported key derivation function OID."),g.oid=b,g.supportedOids=["pkcs5PBKDF2"],g;b=e.derToOid(h.encOid);if(b!==l.oids["aes128-CBC"]&&
485 -b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var q=a.util.createBuffer(h.kdfIterationCount),q=q.getInt(q.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
486 -case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,q,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var h={},k=[];if(!e.validate(c,g,h,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(h.salt),h=a.util.createBuffer(h.iterations),
487 -h=h.getInt(h.length()<<3),q;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:q=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:q=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}q=l.pbe.generatePkcs12Key(d,k,1,h,q);d=l.pbe.generatePkcs12Key(d,k,2,h,c);return b(q,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
486 +b!==l.oids["aes192-CBC"]&&b!==l.oids["aes256-CBC"]&&b!==l.oids["des-EDE3-CBC"]&&b!==l.oids.desCBC)throw g=Error("Cannot read encrypted private key. Unsupported encryption scheme OID."),g.oid=b,g.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],g;c=h.kdfSalt;var p=a.util.createBuffer(h.kdfIterationCount),p=p.getInt(p.length()<<3),m;switch(l.oids[b]){case "aes128-CBC":m=16;g=a.aes.createDecryptionCipher;break;case "aes192-CBC":m=24;g=a.aes.createDecryptionCipher;break;
487 +case "aes256-CBC":m=32;g=a.aes.createDecryptionCipher;break;case "des-EDE3-CBC":m=24;g=a.des.createDecryptionCipher;break;case "desCBC":m=8,g=a.des.createDecryptionCipher}b=a.pkcs5.pbkdf2(d,c,p,m);h=h.encIv;g=g(b);g.start(h);return g};l.pbe.getCipherForPKCS12PBE=function(b,c,d){var g={},k=[];if(!e.validate(c,h,g,k))throw d=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo."),d.errors=k,d;var k=a.util.createBuffer(g.salt),g=a.util.createBuffer(g.iterations),
488 +g=g.getInt(g.length()<<3),p;switch(b){case l.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:p=24;c=8;b=a.des.startDecrypting;break;case l.oids["pbewithSHAAnd40BitRC2-CBC"]:p=5;c=8;b=function(b,c){var d=a.rc2.createDecryptionCipher(b,40);d.start(c,null);return d};break;default:throw d=Error("Cannot read PKCS #12 PBE data block. Unsupported OID."),d.oid=b,d;}p=l.pbe.generatePkcs12Key(d,k,1,g,p);d=l.pbe.generatePkcs12Key(d,k,2,g,c);return b(p,d)};l.pbe.opensslDeriveBytes=function(b,d,e,h){if("undefined"===
489 typeof h||null===h)h=a.md.md5.create();null===d&&(d="");for(var g=[c(h,b+d)],k=16,l=1;k<e;++l,k+=16)g.push(c(h,g[l-1]+b+d));return g.join("").substr(0,e)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pbe)return c.pbe;c.defined.pbe=!0;for(var l=
490 0;l<e.length;++l)e[l](c);return c.pbe}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pbe","require module ./aes ./asn1 ./des ./md ./oids ./pem ./pbkdf2 ./random ./rc2 ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pkcs7asn1=a.pkcs7asn1||{};a.pkcs7=
491 a.pkcs7||{};a.pkcs7.asn1=d;a={name:"ContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:c.Class.UNIVERSAL,type:c.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:c.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};d.contentInfoValidator=a;var e={name:"EncryptedContentInfo",tagClass:c.Class.UNIVERSAL,type:c.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",
@@ -502,111 +503,111 @@ typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){va
503 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.mgf1)return c.mgf1;c.defined.mgf1=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf1}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
504 Array.prototype.slice.call(arguments,0))};a("js/mgf1",["require","module","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.mgf=a.mgf||{};a.mgf.mgf1=a.mgf1}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||
505 {};if(c.defined.mgf)return c.mgf;c.defined.mgf=!0;for(var l=0;l<e.length;++l)e[l](c);return c.mgf}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/mgf",["require","module","./mgf1"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){(a.pss=a.pss||{}).create=function(b){3===arguments.length&&
505 -(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,q){var n,v=q-1,y=Math.ceil(v/8),z=b.digest().getBytes();
506 -if(y<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,y-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),x=y-e-1,C=d.generate(z,x);A="";for(n=0;n<x;n++)A+=String.fromCharCode(R.charCodeAt(n)^C.charCodeAt(n));v=65280>>8*y-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
507 -return A+z+String.fromCharCode(188)},verify:function(b,k,l){var q;q=l-1;l=Math.ceil(q/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-q&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),x="";for(q=0;q<n;q++)x+=String.fromCharCode(v.charCodeAt(q)^R.charCodeAt(q));
508 -x=String.fromCharCode(x.charCodeAt(0)&~A)+x.substr(1);l=l-e-m-2;for(q=0;q<l;q++)if(0!==x.charCodeAt(q))throw Error("Leftmost octets not zero as expected");if(1!==x.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=x.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
506 +(b={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var c=b.md,d=b.mgf,e=c.digestLength,l=b.salt||null;"string"===typeof l&&(l=a.util.createBuffer(l));var m;if("saltLength"in b)m=b.saltLength;else if(null!==l)m=l.length();else throw Error("Salt length not specified or specific salt not given.");if(null!==l&&l.length()!==m)throw Error("Given salt length does not match length of given salt.");var k=b.prng||a.random;return{encode:function(b,p){var n,v=p-1,x=Math.ceil(v/8),z=b.digest().getBytes();
507 +if(x<e+m+2)throw Error("Message is too long to encrypt.");var A;A=null===l?k.getBytesSync(m):l.bytes();n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(z);n.putBytes(A);c.start();c.update(n.getBytes());z=c.digest().getBytes();n=new a.util.ByteBuffer;n.fillWithByte(0,x-m-e-2);n.putByte(1);n.putBytes(A);var R=n.getBytes(),y=x-e-1,E=d.generate(z,y);A="";for(n=0;n<y;n++)A+=String.fromCharCode(R.charCodeAt(n)^E.charCodeAt(n));v=65280>>8*x-v&255;A=String.fromCharCode(A.charCodeAt(0)&~v)+A.substr(1);
508 +return A+z+String.fromCharCode(188)},verify:function(b,k,l){var p;p=l-1;l=Math.ceil(p/8);k=k.substr(-l);if(l<e+m+2)throw Error("Inconsistent parameters to PSS signature verification.");if(188!==k.charCodeAt(l-1))throw Error("Encoded message does not end in 0xBC.");var n=l-e-1,v=k.substr(0,n);k=k.substr(n,e);var A=65280>>8*l-p&255;if(0!==(v.charCodeAt(0)&A))throw Error("Bits beyond keysize not zero as expected.");var R=d.generate(k,n),y="";for(p=0;p<n;p++)y+=String.fromCharCode(v.charCodeAt(p)^R.charCodeAt(p));
509 +y=String.fromCharCode(y.charCodeAt(0)&~A)+y.substr(1);l=l-e-m-2;for(p=0;p<l;p++)if(0!==y.charCodeAt(p))throw Error("Leftmost octets not zero as expected");if(1!==y.charCodeAt(l))throw Error("Inconsistent PSS signature, 0x01 marker not found");l=y.substr(-m);n=new a.util.ByteBuffer;n.fillWithByte(0,8);n.putBytes(b);n.putBytes(l);c.start();c.update(n.getBytes());b=c.digest().getBytes();return k===b}}}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,
510 module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pss)return c.pss;c.defined.pss=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pss}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pss",
510 -["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,g=0;null===d&&g<a.attributes.length;++g)e=a.attributes[g],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var g=0;g<b.length;++g){e=b[g];
511 -var h=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(h=a.util.encodeUtf8(h)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,h)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in g.oids?b.name=g.oids[b.type]:b.shortName&&b.shortName in
512 -v&&(b.name=g.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in g.oids)b.type=g.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(g.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
513 -typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in g.oids&&(b.name=g.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in g.oids)b.id=g.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,h=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
514 -(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(h|=128,d=7);d=String.fromCharCode(d);0!==h?d+=String.fromCharCode(e)+String.fromCharCode(h):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
511 +["require","module","./random","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b){"string"===typeof b&&(b={shortName:b});for(var d=null,e,h=0;null===d&&h<a.attributes.length;++h)e=a.attributes[h],b.type&&b.type===e.type?d=e:b.name&&b.name===e.name?d=e:b.shortName&&b.shortName===e.shortName&&(d=e);return d}function d(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),e;b=b.attributes;for(var h=0;h<b.length;++h){e=b[h];
512 +var g=e.value,l=k.Type.PRINTABLESTRING;"valueTagClass"in e&&(l=e.valueTagClass,l===k.Type.UTF8&&(g=a.util.encodeUtf8(g)));e=k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,l,!1,g)])]);c.value.push(e)}return c}function e(a){for(var b,c=0;c<a.length;++c){b=a[c];"undefined"===typeof b.name&&(b.type&&b.type in h.oids?b.name=h.oids[b.type]:b.shortName&&b.shortName in
513 +v&&(b.name=h.oids[v[b.shortName]]));if("undefined"===typeof b.type)if(b.name&&b.name in h.oids)b.type=h.oids[b.name];else throw a=Error("Attribute type not specified."),a.attribute=b,a;"undefined"===typeof b.shortName&&b.name&&b.name in v&&(b.shortName=v[b.name]);if(b.type===u.extensionRequest&&(b.valueConstructed=!0,b.valueTagClass=k.Type.SEQUENCE,!b.value&&b.extensions)){b.value=[];for(var d=0;d<b.extensions.length;++d)b.value.push(h.certificateExtensionToAsn1(l(b.extensions[d])))}if("undefined"===
514 +typeof b.value)throw a=Error("Attribute value not specified."),a.attribute=b,a;}}function l(b,c){c=c||{};"undefined"===typeof b.name&&b.id&&b.id in h.oids&&(b.name=h.oids[b.id]);if("undefined"===typeof b.id)if(b.name&&b.name in h.oids)b.id=h.oids[b.name];else{var d=Error("Extension ID not specified.");d.extension=b;throw d;}if("undefined"!==typeof b.value)return b;if("keyUsage"===b.name){var e=d=0,g=0;b.digitalSignature&&(e|=128,d=7);b.nonRepudiation&&(e|=64,d=6);b.keyEncipherment&&(e|=32,d=5);b.dataEncipherment&&
515 +(e|=16,d=4);b.keyAgreement&&(e|=8,d=3);b.keyCertSign&&(e|=4,d=2);b.cRLSign&&(e|=2,d=1);b.encipherOnly&&(e|=1,d=0);b.decipherOnly&&(g|=128,d=7);d=String.fromCharCode(d);0!==g?d+=String.fromCharCode(e)+String.fromCharCode(g):0!==e&&(d+=String.fromCharCode(e));b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d)}else if("basicConstraints"===b.name)b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),b.cA&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255))),
516 "pathLenConstraint"in b&&b.value.value.push(k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.pathLenConstraint).getBytes()));else if("extKeyUsage"===b.name)for(e in b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),d=b.value.value,b)!0===b[e]&&(e in u?d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(u[e]).getBytes())):-1!==e.indexOf(".")&&d.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e).getBytes())));else if("nsCertType"===b.name)e=d=0,b.client&&(e|=128,
516 -d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),h=0;h<b.altNames.length;++h){e=b.altNames[h];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
517 +d=7),b.server&&(e|=64,d=6),b.email&&(e|=32,d=5),b.objsign&&(e|=16,d=4),b.reserved&&(e|=8,d=3),b.sslCA&&(e|=4,d=2),b.emailCA&&(e|=2,d=1),b.objCA&&(e|=1,d=0),d=String.fromCharCode(d),0!==e&&(d+=String.fromCharCode(e)),b.value=k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,d);else if("subjectAltName"===b.name||"issuerAltName"===b.name)for(b.value=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]),g=0;g<b.altNames.length;++g){e=b.altNames[g];d=e.value;if(7===e.type&&e.ip){if(d=a.util.bytesFromIP(e.ip),
518 null===d)throw d=Error('Extension "ip" value is not a valid IPv4 or IPv6 address.'),d.extension=b,d;}else 8===e.type&&(d=e.oid?k.oidToDer(k.oidToDer(e.oid)):k.oidToDer(d));b.value.value.push(k.create(k.Class.CONTEXT_SPECIFIC,e.type,!1,d))}else"subjectKeyIdentifier"===b.name&&c.cert&&(d=c.cert.generateSubjectKeyIdentifier(),b.subjectKeyIdentifier=d.toHex(),b.value=k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,d.getBytes()));if("undefined"===typeof b.value)throw d=Error("Extension value not specified."),
519 d.extension=b,d;return b}function n(a,b){switch(a){case u["RSASSA-PSS"]:var c=[];void 0!==b.hash.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])]));void 0!==b.mgf.algorithmOid&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,
520 !1,k.oidToDer(b.mgf.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.mgf.hash.algorithmOid).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.NULL,!1,"")])])]));void 0!==b.saltLength&&c.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.saltLength).getBytes())]));return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,c);default:return k.create(k.Class.UNIVERSAL,k.Type.NULL,
520 -!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],g=e.value,h=k.Type.UTF8;"valueTagClass"in e&&(h=e.valueTagClass);h===k.Type.UTF8&&(g=a.util.encodeUtf8(g));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
521 -h,l,g)])]);c.value.push(e)}return c}var k=a.asn1,g=a.pki=a.pki||{},u=g.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var D=a.pki.rsa.publicKeyValidator,y={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
521 +!1,"")}}function m(b){var c=k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[]);if(0===b.attributes.length)return c;b=b.attributes;for(var d=0;d<b.length;++d){var e=b[d],h=e.value,g=k.Type.UTF8;"valueTagClass"in e&&(g=e.valueTagClass);g===k.Type.UTF8&&(h=a.util.encodeUtf8(h));var l=!1;"valueConstructed"in e&&(l=e.valueConstructed);e=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(e.type).getBytes()),k.create(k.Class.UNIVERSAL,k.Type.SET,!0,[k.create(k.Class.UNIVERSAL,
522 +g,l,h)])]);c.value.push(e)}return c}var k=a.asn1,h=a.pki=a.pki||{},u=h.oids,v={};v.CN=u.commonName;v.commonName="CN";v.C=u.countryName;v.countryName="C";v.L=u.localityName;v.localityName="L";v.ST=u.stateOrProvinceName;v.stateOrProvinceName="ST";v.O=u.organizationName;v.organizationName="O";v.OU=u.organizationalUnitName;v.organizationalUnitName="OU";v.E=u.emailAddress;v.emailAddress="E";var C=a.pki.rsa.publicKeyValidator,x={name:"Certificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,
523 value:[{name:"Certificate.TBSCertificate",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,
524 capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,
525 constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},
525 -{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},D,{name:"Certificate.TBSCertificate.issuerUniqueID",
526 +{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:k.Class.UNIVERSAL,type:k.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:k.Class.UNIVERSAL,type:k.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},C,{name:"Certificate.TBSCertificate.issuerUniqueID",
527 tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},
528 {name:"Certificate.TBSCertificate.extensions",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},
529 {name:"Certificate.signatureValue",tagClass:k.Class.UNIVERSAL,type:k.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},z={name:"rsapss",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,
530 type:k.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:k.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:k.Class.UNIVERSAL,type:k.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:k.Class.UNIVERSAL,
531 type:k.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:k.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:k.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",
532 tagClass:k.Class.UNIVERSAL,type:k.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},A={name:"CertificationRequest",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[{name:"CertificationRequestInfo",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:k.Class.UNIVERSAL,type:k.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",
532 -tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},D,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
533 +tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},C,{name:"CertificationRequestInfo.attributes",tagClass:k.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",
534 tagClass:k.Class.UNIVERSAL,type:k.Type.SET,constructed:!0}]}]}]},{name:"CertificationRequest.signatureAlgorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:k.Class.UNIVERSAL,type:k.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:k.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:k.Class.UNIVERSAL,
534 -type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};g.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,g,h=0;h<a.value.length;++h){d=a.value[h];for(var p=0;p<d.value.length;++p)g={},e=d.value[p],g.type=k.derToOid(e.value[0].value),g.value=e.value[1].value,g.valueTagClass=e.value[1].type,g.type in u&&(g.name=u[g.type],g.name in v&&(g.shortName=v[g.name])),b&&(b.update(g.type),b.update(g.value)),c.push(g)}return c};g.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
535 -a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,h=0;h<d.length;++h){var p={};p.type=e;p.value=d[h].value;p.valueTagClass=d[h].type;p.type in u&&(p.name=u[p.type],p.name in v&&(p.shortName=v[p.name]));if(p.type===u.extensionRequest){p.extensions=[];for(var l=0;l<p.value.length;++l)p.extensions.push(g.certificateExtensionFromAsn1(p.value[l]))}b.push(p)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
536 -saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};g.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
537 -b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificateFromAsn1(d,c)};g.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(g.certificateToAsn1(b)).getBytes()};
538 -return a.pem.encode(d,{maxline:c})};g.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return g.publicKeyFromAsn1(b)};g.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
539 -body:k.toDer(g.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(g.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(g.publicKeyToAsn1(b)).getBytes();
540 -break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};g.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
541 -c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return g.certificationRequestFromAsn1(d,c)};g.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(g.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};g.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
535 +type:k.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};h.RDNAttributesAsArray=function(a,b){for(var c=[],d,e,h,g=0;g<a.value.length;++g){d=a.value[g];for(var q=0;q<d.value.length;++q)h={},e=d.value[q],h.type=k.derToOid(e.value[0].value),h.value=e.value[1].value,h.valueTagClass=e.value[1].type,h.type in u&&(h.name=u[h.type],h.name in v&&(h.shortName=v[h.name])),b&&(b.update(h.type),b.update(h.value)),c.push(h)}return c};h.CRIAttributesAsArray=function(a){for(var b=[],c=0;c<a.length;++c)for(var d=
536 +a[c],e=k.derToOid(d.value[0].value),d=d.value[1].value,g=0;g<d.length;++g){var q={};q.type=e;q.value=d[g].value;q.valueTagClass=d[g].type;q.type in u&&(q.name=u[q.type],q.name in v&&(q.shortName=v[q.name]));if(q.type===u.extensionRequest){q.extensions=[];for(var l=0;l<q.value.length;++l)q.extensions.push(h.certificateExtensionFromAsn1(q.value[l]))}b.push(q)}return b};var R=function(a,b,c){var d={};if(a!==u["RSASSA-PSS"])return d;c&&(d={hash:{algorithmOid:u.sha1},mgf:{algorithmOid:u.mgf1,hash:{algorithmOid:u.sha1}},
537 +saltLength:20});c={};a=[];if(!k.validate(b,z,c,a))throw b=Error("Cannot read RSASSA-PSS parameter block."),b.errors=a,b;void 0!==c.hashOid&&(d.hash=d.hash||{},d.hash.algorithmOid=k.derToOid(c.hashOid));void 0!==c.maskGenOid&&(d.mgf=d.mgf||{},d.mgf.algorithmOid=k.derToOid(c.maskGenOid),d.mgf.hash=d.mgf.hash||{},d.mgf.hash.algorithmOid=k.derToOid(c.maskGenHashOid));void 0!==c.saltLength&&(d.saltLength=c.saltLength.charCodeAt(0));return d};h.certificateFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE"!==
538 +b.type&&"X509 CERTIFICATE"!==b.type&&"TRUSTED CERTIFICATE"!==b.type)throw c=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".'),c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificateFromAsn1(d,c)};h.certificateToPem=function(b,c){var d={type:"CERTIFICATE",body:k.toDer(h.certificateToAsn1(b)).getBytes()};
539 +return a.pem.encode(d,{maxline:c})};h.publicKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PUBLIC KEY"!==b.type&&"RSA PUBLIC KEY"!==b.type){var c=Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert public key from PEM; PEM is encrypted.");b=k.fromDer(b.body);return h.publicKeyFromAsn1(b)};h.publicKeyToPem=function(b,c){var d={type:"PUBLIC KEY",
540 +body:k.toDer(h.publicKeyToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.publicKeyToRSAPublicKeyPem=function(b,c){var d={type:"RSA PUBLIC KEY",body:k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.getPublicKeyFingerprint=function(b,c){c=c||{};var d=c.md||a.md.sha1.create(),e;switch(c.type||"RSAPublicKey"){case "RSAPublicKey":e=k.toDer(h.publicKeyToRSAPublicKey(b)).getBytes();break;case "SubjectPublicKeyInfo":e=k.toDer(h.publicKeyToAsn1(b)).getBytes();
541 +break;default:throw Error('Unknown fingerprint type "'+c.type+'".');}d.start();d.update(e);d=d.digest();if("hex"===c.encoding)return d=d.toHex(),c.delimiter?d.match(/.{2}/g).join(c.delimiter):d;if("binary"===c.encoding)return d.getBytes();if(c.encoding)throw Error('Unknown encoding "'+c.encoding+'".');return d};h.certificationRequestFromPem=function(b,c,d){b=a.pem.decode(b)[0];if("CERTIFICATE REQUEST"!==b.type)throw c=Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".'),
542 +c.headerType=b.type,c;if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert certification request from PEM; PEM is encrypted.");d=k.fromDer(b.body,d);return h.certificationRequestFromAsn1(d,c)};h.certificationRequestToPem=function(b,c){var d={type:"CERTIFICATE REQUEST",body:k.toDer(h.certificationRequestToAsn1(b)).getBytes()};return a.pem.encode(d,{maxline:c})};h.createCertificate=function(){var b={version:2,serialNumber:"00",signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=
543 null;b.validity={};b.validity.notBefore=new Date;b.validity.notAfter=new Date;b.issuer={};b.issuer.getField=function(a){return c(b.issuer,a)};b.issuer.addField=function(a){e([a]);b.issuer.attributes.push(a)};b.issuer.attributes=[];b.issuer.hash=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.extensions=[];b.publicKey=null;b.md=null;b.setSubject=function(a,c){e(a);
544 b.subject.attributes=a;delete b.subject.uniqueId;c&&(b.subject.uniqueId=c);b.subject.hash=null};b.setIssuer=function(a,c){e(a);b.issuer.attributes=a;delete b.issuer.uniqueId;c&&(b.issuer.uniqueId=c);b.issuer.hash=null};b.setExtensions=function(a){for(var c=0;c<a.length;++c)l(a[c],{cert:b});b.extensions=a};b.getExtension=function(a){"string"===typeof a&&(a={name:a});for(var c=null,d,e=0;null===c&&e<b.extensions.length;++e)d=b.extensions[e],a.id&&d.id===a.id?c=d:a.name&&d.name===a.name&&(c=d);return c};
544 -b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=g.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
545 +b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certificate digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=e;b.tbsCertificate=h.getTBSCertificate(b);e=k.toDer(b.tbsCertificate);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(c){var d=!1;if(!b.issued(c)){var d=b.subject,e=Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");
546 e.expectedIssuer=c.issuer.attributes;e.actualIssuer=d.attributes;throw e;}e=c.md;if(null===e){if(c.signatureOid in u)switch(u[c.signatureOid]){case "sha1WithRSAEncryption":e=a.md.sha1.create();break;case "md5WithRSAEncryption":e=a.md.md5.create();break;case "sha256WithRSAEncryption":e=a.md.sha256.create();break;case "sha512WithRSAEncryption":e=a.md.sha512.create();break;case "RSASSA-PSS":e=a.md.sha256.create()}if(null===e)throw e=Error("Could not compute certificate digest. Unknown signature OID."),
546 -e.signatureOid=c.signatureOid,e;var h=c.tbsCertificate||g.getTBSCertificate(c),h=k.toDer(h);e.update(h.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
547 +e.signatureOid=c.signatureOid,e;var g=c.tbsCertificate||h.getTBSCertificate(c),g=k.toDer(g);e.update(g.getBytes())}if(null!==e){var l;switch(c.signatureOid){case u.sha1WithRSAEncryption:l=void 0;break;case u["RSASSA-PSS"]:d=u[c.signatureParameters.mgf.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw e=Error("Unsupported MGF hash function."),e.oid=c.signatureParameters.mgf.hash.algorithmOid,e.name=d,e;l=u[c.signatureParameters.mgf.algorithmOid];if(void 0===l||void 0===a.mgf[l])throw e=Error("Unsupported MGF function."),
548 e.oid=c.signatureParameters.mgf.algorithmOid,e.name=l,e;l=a.mgf[l].create(a.md[d].create());d=u[c.signatureParameters.hash.algorithmOid];if(void 0===d||void 0===a.md[d])throw{message:"Unsupported RSASSA-PSS hash function.",oid:c.signatureParameters.hash.algorithmOid,name:d};l=a.pss.create(a.md[d].create(),l,c.signatureParameters.saltLength)}d=b.publicKey.verify(e.digest().getBytes(),c.signature,l)}return d};b.isIssuer=function(a){var c=!1,d=b.issuer;a=a.subject;if(d.hash&&a.hash)c=d.hash===a.hash;
548 -else if(d.attributes.length===a.attributes.length)for(var c=!0,e,g,h=0;c&&h<d.attributes.length;++h)if(e=d.attributes[h],g=a.attributes[h],e.type!==g.type||e.value!==g.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return g.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
549 -a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};g.certificateFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,y,h,l))throw h=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),h.errors=l,h;if("string"!==typeof h.certSignature){for(var l="\x00",m=0;m<h.certSignature.length;++m)l+=k.toDer(h.certSignature[m]).getBytes();h.certSignature=l}var l=k.derToOid(h.publicKeyOid),r=g.createCertificate();r.version=h.certVersion?h.certVersion.charCodeAt(0):
550 -0;m=a.util.createBuffer(h.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(h.certSignatureOid);r.signatureParameters=R(r.signatureOid,h.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,h.certinfoSignatureParams,!1);m=a.util.createBuffer(h.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==h.certValidity1UTCTime&&m.push(k.utcTimeToDate(h.certValidity1UTCTime));void 0!==h.certValidity2GeneralizedTime&&
551 -m.push(k.generalizedTimeToDate(h.certValidity2GeneralizedTime));void 0!==h.certValidity3UTCTime&&m.push(k.utcTimeToDate(h.certValidity3UTCTime));void 0!==h.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(h.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
552 -r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=h.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw h=Error("Could not compute certificate digest. Unknown signature OID."),
553 -h.signatureOid=r.signatureOid,h;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=g.RDNAttributesAsArray(h.certIssuer,m);h.certIssuerUniqueId&&(r.issuer.uniqueId=h.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
554 -r.subject.attributes=g.RDNAttributesAsArray(h.certSubject,m);h.certSubjectUniqueId&&(r.subject.uniqueId=h.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=h.certExtensions?g.certificateExtensionsFromAsn1(h.certExtensions):[];l===g.oids.rsaEncryption&&(r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo));return r};g.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(g.certificateExtensionFromAsn1(d.value[e]));
555 -return b};g.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
549 +else if(d.attributes.length===a.attributes.length)for(var c=!0,e,h,g=0;c&&g<d.attributes.length;++g)if(e=d.attributes[g],h=a.attributes[g],e.type!==h.type||e.value!==h.value)c=!1;return c};b.issued=function(a){return a.isIssuer(b)};b.generateSubjectKeyIdentifier=function(){return h.getPublicKeyFingerprint(b.publicKey,{type:"RSAPublicKey"})};b.verifySubjectKeyIdentifier=function(){for(var c=u.subjectKeyIdentifier,d=0;d<b.extensions.length;++d){var e=b.extensions[d];if(e.id===c)return c=b.generateSubjectKeyIdentifier().getBytes(),
550 +a.util.hexToBytes(e.subjectKeyIdentifier)===c}return!1};return b};h.certificateFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,x,g,l))throw g=Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate."),g.errors=l,g;if("string"!==typeof g.certSignature){for(var l="\x00",m=0;m<g.certSignature.length;++m)l+=k.toDer(g.certSignature[m]).getBytes();g.certSignature=l}var l=k.derToOid(g.publicKeyOid),r=h.createCertificate();r.version=g.certVersion?g.certVersion.charCodeAt(0):
551 +0;m=a.util.createBuffer(g.certSerialNumber);r.serialNumber=m.toHex();r.signatureOid=a.asn1.derToOid(g.certSignatureOid);r.signatureParameters=R(r.signatureOid,g.certSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.certinfoSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,g.certinfoSignatureParams,!1);m=a.util.createBuffer(g.certSignature);++m.read;r.signature=m.getBytes();m=[];void 0!==g.certValidity1UTCTime&&m.push(k.utcTimeToDate(g.certValidity1UTCTime));void 0!==g.certValidity2GeneralizedTime&&
552 +m.push(k.generalizedTimeToDate(g.certValidity2GeneralizedTime));void 0!==g.certValidity3UTCTime&&m.push(k.utcTimeToDate(g.certValidity3UTCTime));void 0!==g.certValidity4GeneralizedTime&&m.push(k.generalizedTimeToDate(g.certValidity4GeneralizedTime));if(2<m.length)throw Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(2>m.length)throw Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");
553 +r.validity.notBefore=m[0];r.validity.notAfter=m[1];r.tbsCertificate=g.tbsCertificate;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===r.md)throw g=Error("Could not compute certificate digest. Unknown signature OID."),
554 +g.signatureOid=r.signatureOid,g;m=k.toDer(r.tbsCertificate);r.md.update(m.getBytes())}m=a.md.sha1.create();r.issuer.getField=function(a){return c(r.issuer,a)};r.issuer.addField=function(a){e([a]);r.issuer.attributes.push(a)};r.issuer.attributes=h.RDNAttributesAsArray(g.certIssuer,m);g.certIssuerUniqueId&&(r.issuer.uniqueId=g.certIssuerUniqueId);r.issuer.hash=m.digest().toHex();m=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};
555 +r.subject.attributes=h.RDNAttributesAsArray(g.certSubject,m);g.certSubjectUniqueId&&(r.subject.uniqueId=g.certSubjectUniqueId);r.subject.hash=m.digest().toHex();r.extensions=g.certExtensions?h.certificateExtensionsFromAsn1(g.certExtensions):[];l===h.oids.rsaEncryption&&(r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo));return r};h.certificateExtensionsFromAsn1=function(a){for(var b=[],c=0;c<a.value.length;++c)for(var d=a.value[c],e=0;e<d.value.length;++e)b.push(h.certificateExtensionFromAsn1(d.value[e]));
556 +return b};h.certificateExtensionFromAsn1=function(b){var c={};c.id=k.derToOid(b.value[0].value);c.critical=!1;b.value[1].type===k.Type.BOOLEAN?(c.critical=0!==b.value[1].value.charCodeAt(0),c.value=b.value[2].value):c.value=b.value[1].value;if(c.id in u)if(c.name=u[c.id],"keyUsage"===c.name){b=k.fromDer(c.value);var d=0,e=0;1<b.value.length&&(d=b.value.charCodeAt(1),e=2<b.value.length?b.value.charCodeAt(2):0);c.digitalSignature=128===(d&128);c.nonRepudiation=64===(d&64);c.keyEncipherment=32===(d&
557 32);c.dataEncipherment=16===(d&16);c.keyAgreement=8===(d&8);c.keyCertSign=4===(d&4);c.cRLSign=2===(d&2);c.encipherOnly=1===(d&1);c.decipherOnly=128===(e&128)}else if("basicConstraints"===c.name)b=k.fromDer(c.value),c.cA=0<b.value.length&&b.value[0].type===k.Type.BOOLEAN?0!==b.value[0].value.charCodeAt(0):!1,d=null,0<b.value.length&&b.value[0].type===k.Type.INTEGER?d=b.value[0].value:1<b.value.length&&(d=b.value[1].value),null!==d&&(c.pathLenConstraint=k.derToInteger(d));else if("extKeyUsage"===c.name)for(b=
558 k.fromDer(c.value),d=0;d<b.value.length;++d)e=k.derToOid(b.value[d].value),e in u?c[u[e]]=!0:c[e]=!0;else if("nsCertType"===c.name)b=k.fromDer(c.value),d=0,1<b.value.length&&(d=b.value.charCodeAt(1)),c.client=128===(d&128),c.server=64===(d&64),c.email=32===(d&32),c.objsign=16===(d&16),c.reserved=8===(d&8),c.sslCA=4===(d&4),c.emailCA=2===(d&2),c.objCA=1===(d&1);else if("subjectAltName"===c.name||"issuerAltName"===c.name)for(c.altNames=[],b=k.fromDer(c.value),e=0;e<b.value.length;++e){var d=b.value[e],
558 -h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};g.certificationRequestFromAsn1=function(b,d){var h={},l=[];if(!k.validate(b,A,h,l))throw h=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),h.errors=l,h;if("string"!==typeof h.csrSignature){for(var l=
559 -"\x00",m=0;m<h.csrSignature.length;++m)l+=k.toDer(h.csrSignature[m]).getBytes();h.csrSignature=l}l=k.derToOid(h.publicKeyOid);if(l!==g.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=g.createCertificationRequest();r.version=h.csrVersion?h.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(h.csrSignatureOid);r.signatureParameters=R(r.signatureOid,h.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(h.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
560 -h.csrSignatureParams,!1);l=a.util.createBuffer(h.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=h.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
561 -r.md)throw h=Error("Could not compute certification request digest. Unknown signature OID."),h.signatureOid=r.signatureOid,h;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=g.RDNAttributesAsArray(h.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=g.publicKeyFromAsn1(h.subjectPublicKeyInfo);
562 -r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=g.CRIAttributesAsArray(h.certificationRequestInfoAttributes||[]);return r};g.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
559 +h={type:d.type,value:d.value};c.altNames.push(h);switch(d.type){case 7:h.ip=a.util.bytesToIP(d.value);break;case 8:h.oid=k.derToOid(d.value)}}else"subjectKeyIdentifier"===c.name&&(b=k.fromDer(c.value),c.subjectKeyIdentifier=a.util.bytesToHex(b.value));return c};h.certificationRequestFromAsn1=function(b,d){var g={},l=[];if(!k.validate(b,A,g,l))throw g=Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest."),g.errors=l,g;if("string"!==typeof g.csrSignature){for(var l=
560 +"\x00",m=0;m<g.csrSignature.length;++m)l+=k.toDer(g.csrSignature[m]).getBytes();g.csrSignature=l}l=k.derToOid(g.publicKeyOid);if(l!==h.oids.rsaEncryption)throw Error("Cannot read public key. OID is not RSA.");var r=h.createCertificationRequest();r.version=g.csrVersion?g.csrVersion.charCodeAt(0):0;r.signatureOid=a.asn1.derToOid(g.csrSignatureOid);r.signatureParameters=R(r.signatureOid,g.csrSignatureParams,!0);r.siginfo.algorithmOid=a.asn1.derToOid(g.csrSignatureOid);r.siginfo.parameters=R(r.siginfo.algorithmOid,
561 +g.csrSignatureParams,!1);l=a.util.createBuffer(g.csrSignature);++l.read;r.signature=l.getBytes();r.certificationRequestInfo=g.certificationRequestInfo;if(d){r.md=null;if(r.signatureOid in u)switch(l=u[r.signatureOid],l){case "sha1WithRSAEncryption":r.md=a.md.sha1.create();break;case "md5WithRSAEncryption":r.md=a.md.md5.create();break;case "sha256WithRSAEncryption":r.md=a.md.sha256.create();break;case "sha512WithRSAEncryption":r.md=a.md.sha512.create();break;case "RSASSA-PSS":r.md=a.md.sha256.create()}if(null===
562 +r.md)throw g=Error("Could not compute certification request digest. Unknown signature OID."),g.signatureOid=r.signatureOid,g;l=k.toDer(r.certificationRequestInfo);r.md.update(l.getBytes())}l=a.md.sha1.create();r.subject.getField=function(a){return c(r.subject,a)};r.subject.addField=function(a){e([a]);r.subject.attributes.push(a)};r.subject.attributes=h.RDNAttributesAsArray(g.certificationRequestInfoSubject,l);r.subject.hash=l.digest().toHex();r.publicKey=h.publicKeyFromAsn1(g.subjectPublicKeyInfo);
563 +r.getAttribute=function(a){return c(r,a)};r.addAttribute=function(a){e([a]);r.attributes.push(a)};r.attributes=h.CRIAttributesAsArray(g.certificationRequestInfoAttributes||[]);return r};h.createCertificationRequest=function(){var b={version:0,signatureOid:null,signature:null,siginfo:{}};b.siginfo.algorithmOid=null;b.subject={};b.subject.getField=function(a){return c(b.subject,a)};b.subject.addField=function(a){e([a]);b.subject.attributes.push(a)};b.subject.attributes=[];b.subject.hash=null;b.publicKey=
564 null;b.attributes=[];b.getAttribute=function(a){return c(b,a)};b.addAttribute=function(a){e([a]);b.attributes.push(a)};b.md=null;b.setSubject=function(a){e(a);b.subject.attributes=a;b.subject.hash=null};b.setAttributes=function(a){e(a);b.attributes=a};b.sign=function(c,d){b.md=d||a.md.sha1.create();var e=u[b.md.algorithm+"WithRSAEncryption"];if(!e)throw e=Error("Could not compute certification request digest. Unknown message digest algorithm OID."),e.algorithm=b.md.algorithm,e;b.signatureOid=b.siginfo.algorithmOid=
564 -e;b.certificationRequestInfo=g.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
565 -d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||g.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var h;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;h=u[b.signatureParameters.mgf.algorithmOid];
566 -if(void 0===h||void 0===a.mgf[h])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=h,d;h=a.mgf[h].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;h=a.pss.create(a.md[c].create(),h,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,h)}return c};return b};
567 -g.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
568 -k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),g.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
569 -!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(g.certificateExtensionsToAsn1(b.extensions));return c};g.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),g.publicKeyToAsn1(a.publicKey),m(a)])};g.distinguishedNameToAsn1=function(a){return d(a)};g.certificateToAsn1=function(a){var b=a.tbsCertificate||g.getTBSCertificate(a);
570 -return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(g.certificateExtensionToAsn1(a[d]));
571 -return b};g.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};g.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
572 -g.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};g.createCaStore=function(b){function c(b){if(!b.hash){var l=a.md.sha1.create();b.attributes=g.RDNAttributesAsArray(d(b),l);b.hash=l.digest().toHex()}return e.certs[b.hash]||
573 -null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=g.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(g.certificateToAsn1(b)).getBytes();
574 -for(var e=0;e<d.length;++e){var h=k.toDer(g.certificateToAsn1(d[e])).getBytes();if(b===h)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};g.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
575 -g.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),h=new Date,l=!0,k=null,m=0;do{var q=c.shift(),A=null,u=!1;if(h<q.validity.notBefore||h>q.validity.notAfter)k={message:"Certificate is not valid yet or has expired.",error:g.certificateError.certificate_expired,notBefore:q.validity.notBefore,notAfter:q.validity.notAfter,now:h};if(null===k){A=c[0]||b.getIssuer(q);null===A&&q.isIssuer(q)&&(u=!0,A=q);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var y=!1;!y&&0<n.length;){A=n.shift();
576 -try{y=A.verify(q)}catch(v){}}y||(k={message:"Certificate signature is invalid.",error:g.certificateError.bad_certificate})}null!==k||A&&!u||b.hasCertificate(q)||(k={message:"Certificate is not trusted.",error:g.certificateError.unknown_ca})}null===k&&A&&!q.isIssuer(A)&&(k={message:"Certificate issuer is invalid.",error:g.certificateError.bad_certificate});if(null===k)for(n={keyUsage:!0,basicConstraints:!0},y=0;null===k&&y<q.extensions.length;++y){var w=q.extensions[y];!w.critical||w.name in n||(k=
577 -{message:"Certificate has an unsupported critical extension.",error:g.certificateError.unsupported_certificate})}null!==k||l&&(0!==c.length||A&&!u)||(l=q.getExtension("basicConstraints"),q=q.getExtension("keyUsage"),null!==q&&(q.keyCertSign&&null!==l||(k={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:g.certificateError.bad_certificate})),
578 -null!==k||null===l||l.cA||(k={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:g.certificateError.bad_certificate}),null===k&&null!==q&&"pathLenConstraint"in l&&m-1>l.pathLenConstraint&&(k={message:"Certificate basicConstraints pathLenConstraint violated.",error:g.certificateError.bad_certificate}));q=null===k?!0:k.error;l=d?d(q,m,e):q;if(!0===l)k=null;else{!0===q&&(k={message:"The application rejected the certificate.",error:g.certificateError.bad_certificate});
579 -if(l||0===l)"object"!==typeof l||a.util.isArray(l)?"string"===typeof l&&(k.error=l):(l.message&&(k.message=l.message),l.error&&(k.error=l.error));throw k;}l=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
565 +e;b.certificationRequestInfo=h.getCertificationRequestInfo(b);e=k.toDer(b.certificationRequestInfo);b.md.update(e.getBytes());b.signature=c.sign(b.md)};b.verify=function(){var c=!1,d=b.md;if(null===d){if(b.signatureOid in u)switch(u[b.signatureOid]){case "sha1WithRSAEncryption":d=a.md.sha1.create();break;case "md5WithRSAEncryption":d=a.md.md5.create();break;case "sha256WithRSAEncryption":d=a.md.sha256.create();break;case "sha512WithRSAEncryption":d=a.md.sha512.create();break;case "RSASSA-PSS":d=a.md.sha256.create()}if(null===
566 +d)throw d=Error("Could not compute certification request digest. Unknown signature OID."),d.signatureOid=b.signatureOid,d;var e=b.certificationRequestInfo||h.getCertificationRequestInfo(b),e=k.toDer(e);d.update(e.getBytes())}if(null!==d){var g;switch(b.signatureOid){case u["RSASSA-PSS"]:c=u[b.signatureParameters.mgf.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported MGF hash function."),d.oid=b.signatureParameters.mgf.hash.algorithmOid,d.name=c,d;g=u[b.signatureParameters.mgf.algorithmOid];
567 +if(void 0===g||void 0===a.mgf[g])throw d=Error("Unsupported MGF function."),d.oid=b.signatureParameters.mgf.algorithmOid,d.name=g,d;g=a.mgf[g].create(a.md[c].create());c=u[b.signatureParameters.hash.algorithmOid];if(void 0===c||void 0===a.md[c])throw d=Error("Unsupported RSASSA-PSS hash function."),d.oid=b.signatureParameters.hash.algorithmOid,d.name=c,d;g=a.pss.create(a.md[c].create(),g,b.signatureParameters.saltLength)}c=b.publicKey.verify(d.digest().getBytes(),b.signature,g)}return c};return b};
568 +h.getTBSCertificate=function(b){var c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.CONTEXT_SPECIFIC,0,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(b.version).getBytes())]),k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,a.util.hexToBytes(b.serialNumber)),k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(b.siginfo.algorithmOid).getBytes()),n(b.siginfo.algorithmOid,b.siginfo.parameters)]),d(b.issuer),k.create(k.Class.UNIVERSAL,
569 +k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notBefore)),k.create(k.Class.UNIVERSAL,k.Type.UTCTIME,!1,k.dateToUtcTime(b.validity.notAfter))]),d(b.subject),h.publicKeyToAsn1(b.publicKey)]);b.issuer.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,1,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+b.issuer.uniqueId)]));b.subject.uniqueId&&c.value.push(k.create(k.Class.CONTEXT_SPECIFIC,2,!0,[k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,
570 +!1,String.fromCharCode(0)+b.subject.uniqueId)]));0<b.extensions.length&&c.value.push(h.certificateExtensionsToAsn1(b.extensions));return c};h.getCertificationRequestInfo=function(a){return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.INTEGER,!1,k.integerToDer(a.version).getBytes()),d(a.subject),h.publicKeyToAsn1(a.publicKey),m(a)])};h.distinguishedNameToAsn1=function(a){return d(a)};h.certificateToAsn1=function(a){var b=a.tbsCertificate||h.getTBSCertificate(a);
571 +return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.certificateExtensionsToAsn1=function(a){var b=k.create(k.Class.CONTEXT_SPECIFIC,3,!0,[]),c=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(c);for(var d=0;d<a.length;++d)c.value.push(h.certificateExtensionToAsn1(a[d]));
572 +return b};h.certificateExtensionToAsn1=function(a){var b=k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[]);b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.id).getBytes()));a.critical&&b.value.push(k.create(k.Class.UNIVERSAL,k.Type.BOOLEAN,!1,String.fromCharCode(255)));var c=a.value;"string"!==typeof a.value&&(c=k.toDer(c).getBytes());b.value.push(k.create(k.Class.UNIVERSAL,k.Type.OCTETSTRING,!1,c));return b};h.certificationRequestToAsn1=function(a){var b=a.certificationRequestInfo||
573 +h.getCertificationRequestInfo(a);return k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[b,k.create(k.Class.UNIVERSAL,k.Type.SEQUENCE,!0,[k.create(k.Class.UNIVERSAL,k.Type.OID,!1,k.oidToDer(a.signatureOid).getBytes()),n(a.signatureOid,a.signatureParameters)]),k.create(k.Class.UNIVERSAL,k.Type.BITSTRING,!1,String.fromCharCode(0)+a.signature)])};h.createCaStore=function(b){function c(b){if(!b.hash){var k=a.md.sha1.create();b.attributes=h.RDNAttributesAsArray(d(b),k);b.hash=k.digest().toHex()}return e.certs[b.hash]||
574 +null}var e={certs:{},getIssuer:function(a){return c(a.issuer)},addCertificate:function(b){"string"===typeof b&&(b=a.pki.certificateFromPem(b));if(!b.subject.hash){var c=a.md.sha1.create();b.subject.attributes=h.RDNAttributesAsArray(d(b.subject),c);b.subject.hash=c.digest().toHex()}b.subject.hash in e.certs?(c=e.certs[b.subject.hash],a.util.isArray(c)||(c=[c]),c.push(b)):e.certs[b.subject.hash]=b},hasCertificate:function(b){var d=c(b.subject);if(!d)return!1;a.util.isArray(d)||(d=[d]);b=k.toDer(h.certificateToAsn1(b)).getBytes();
575 +for(var e=0;e<d.length;++e){var g=k.toDer(h.certificateToAsn1(d[e])).getBytes();if(b===g)return!0}return!1}};if(b)for(var l=0;l<b.length;++l)e.addCertificate(b[l]);return e};h.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};
576 +h.verifyCertificateChain=function(b,c,d){c=c.slice(0);var e=c.slice(0),g=new Date,k=!0,l=null,m=0;do{var p=c.shift(),A=null,u=!1;if(g<p.validity.notBefore||g>p.validity.notAfter)l={message:"Certificate is not valid yet or has expired.",error:h.certificateError.certificate_expired,notBefore:p.validity.notBefore,notAfter:p.validity.notAfter,now:g};if(null===l){A=c[0]||b.getIssuer(p);null===A&&p.isIssuer(p)&&(u=!0,A=p);if(A){var n=A;a.util.isArray(n)||(n=[n]);for(var x=!1;!x&&0<n.length;){A=n.shift();
577 +try{x=A.verify(p)}catch(v){}}x||(l={message:"Certificate signature is invalid.",error:h.certificateError.bad_certificate})}null!==l||A&&!u||b.hasCertificate(p)||(l={message:"Certificate is not trusted.",error:h.certificateError.unknown_ca})}null===l&&A&&!p.isIssuer(A)&&(l={message:"Certificate issuer is invalid.",error:h.certificateError.bad_certificate});if(null===l)for(n={keyUsage:!0,basicConstraints:!0},x=0;null===l&&x<p.extensions.length;++x){var w=p.extensions[x];!w.critical||w.name in n||(l=
578 +{message:"Certificate has an unsupported critical extension.",error:h.certificateError.unsupported_certificate})}null!==l||k&&(0!==c.length||A&&!u)||(k=p.getExtension("basicConstraints"),p=p.getExtension("keyUsage"),null!==p&&(p.keyCertSign&&null!==k||(l={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:h.certificateError.bad_certificate})),
579 +null!==l||null===k||k.cA||(l={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:h.certificateError.bad_certificate}),null===l&&null!==p&&"pathLenConstraint"in k&&m-1>k.pathLenConstraint&&(l={message:"Certificate basicConstraints pathLenConstraint violated.",error:h.certificateError.bad_certificate}));p=null===l?!0:l.error;k=d?d(p,m,e):p;if(!0===k)l=null;else{!0===p&&(l={message:"The application rejected the certificate.",error:h.certificateError.bad_certificate});
580 +if(k||0===k)"object"!==typeof k||a.util.isArray(k)?"string"===typeof k&&(l.error=k):(k.message&&(l.message=k.message),k.error&&(l.error=k.error));throw l;}k=!1;++m}while(0<c.length);return!0}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.x509)return c.x509;
581 c.defined.x509=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/x509","require module ./aes ./asn1 ./des ./md ./mgf ./oids ./pem ./pss ./rsa ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(a,b,d,e){for(var h=
581 -[],g=0;g<a.length;g++)for(var l=0;l<a[g].safeBags.length;l++){var p=a[g].safeBags[l];if(void 0===e||p.type===e)null===b?h.push(p):void 0!==p.attributes[b]&&0<=p.attributes[b].indexOf(d)&&h.push(p)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,g,q){c=m.fromDer(c,g);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
582 -for(var n=0;n<c.value.length;n++){var y={},v=[];if(!m.validate(c.value[n],u,y,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=y.content.value[0];switch(m.derToOid(y.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=q,y={},D=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,y,D))throw b=Error("Cannot read EncryptedContentInfo."),
583 -b.errors=D,b;r=m.derToOid(y.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(y.encAlgorithm);r=k.pbe.getCipher(r,y.encParameter,z);y=d(y.encryptedContentAsn1);y=a.util.createBuffer(y.value);r.update(y);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(y.contentType),b;}v.safeBags=
584 -l(r,g,q);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],D,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var p={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(p);var q,u,y=h.bagValue.value[0];switch(p.type){case k.oids.pkcs8ShroudedKeyBag:if(y=
585 -k.decryptPrivateKeyInfo(y,c),null===y)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{p.key=k.privateKeyFromAsn1(y)}catch(v){p.key=null,p.asn1=y}continue;case k.oids.certBag:q=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{p.cert=k.certificateFromAsn1(a,!0)}catch(c){p.cert=null,p.asn1=a}};break;default:throw a=
586 -Error("Unsupported PKCS#12 SafeBag type."),a.oid=p.type,a;}if(void 0!==q&&!m.validate(y,q,h,g))throw a=Error("Cannot read PKCS#12 "+q.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],y,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,g=a.pkcs12=
582 +[],g=0;g<a.length;g++)for(var k=0;k<a[g].safeBags.length;k++){var q=a[g].safeBags[k];if(void 0===e||q.type===e)null===b?h.push(q):void 0!==q.attributes[b]&&0<=q.attributes[b].indexOf(d)&&h.push(q)}return h}function d(b){if(b.composed||b.constructed){for(var c=a.util.createBuffer(),e=0;e<b.value.length;++e)c.putBytes(b.value[e].value);b.composed=b.constructed=!1;b.value=c.getBytes()}return b}function e(b,c,h,p){c=m.fromDer(c,h);if(c.tagClass!==m.Class.UNIVERSAL||c.type!==m.Type.SEQUENCE||!0!==c.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");
583 +for(var n=0;n<c.value.length;n++){var x={},v=[];if(!m.validate(c.value[n],u,x,v))throw b=Error("Cannot read ContentInfo."),b.errors=v,b;var v={encrypted:!1},r=null,r=x.content.value[0];switch(m.derToOid(x.contentType)){case k.oids.data:if(r.tagClass!==m.Class.UNIVERSAL||r.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");r=d(r).value;break;case k.oids.encryptedData:var z=p,x={},C=[];if(!m.validate(r,a.pkcs7.asn1.encryptedDataValidator,x,C))throw b=Error("Cannot read EncryptedContentInfo."),
584 +b.errors=C,b;r=m.derToOid(x.contentType);if(r!==k.oids.data)throw b=Error("PKCS#12 EncryptedContentInfo ContentType is not Data."),b.oid=r,b;r=m.derToOid(x.encAlgorithm);r=k.pbe.getCipher(r,x.encParameter,z);x=d(x.encryptedContentAsn1);x=a.util.createBuffer(x.value);r.update(x);if(!r.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");r=r.output.getBytes();v.encrypted=!0;break;default:throw b=Error("Unsupported PKCS#12 contentType."),b.contentType=m.derToOid(x.contentType),b;}v.safeBags=
585 +l(r,h,p);b.safeContents.push(v)}}function l(a,b,c){if(!b&&0===a.length)return[];a=m.fromDer(a,b);if(a.tagClass!==m.Class.UNIVERSAL||a.type!==m.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],e=0;e<a.value.length;e++){var h={},g=[];if(!m.validate(a.value[e],C,h,g))throw a=Error("Cannot read SafeBag."),a.errors=g,a;var q={type:m.derToOid(h.bagId),attributes:n(h.bagAttributes)};d.push(q);var p,u,x=h.bagValue.value[0];switch(q.type){case k.oids.pkcs8ShroudedKeyBag:if(x=
586 +k.decryptPrivateKeyInfo(x,c),null===x)throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case k.oids.keyBag:try{q.key=k.privateKeyFromAsn1(x)}catch(v){q.key=null,q.asn1=x}continue;case k.oids.certBag:p=z;u=function(){if(m.derToOid(h.certId)!==k.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");a.oid=m.derToOid(h.certId);throw a;}a=m.fromDer(h.cert,b);try{q.cert=k.certificateFromAsn1(a,!0)}catch(c){q.cert=null,q.asn1=a}};break;default:throw a=
587 +Error("Unsupported PKCS#12 SafeBag type."),a.oid=q.type,a;}if(void 0!==p&&!m.validate(x,p,h,g))throw a=Error("Cannot read PKCS#12 "+p.name),a.errors=g,a;u()}return d}function n(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},e=[];if(!m.validate(a[c],x,d,e))throw a=Error("Cannot read PKCS#12 BagAttribute."),a.errors=e,a;e=m.derToOid(d.oid);if(void 0!==k.oids[e]){b[k.oids[e]]=[];for(var h=0;h<d.values.length;++h)b[k.oids[e]].push(d.values[h].value)}}return b}var m=a.asn1,k=a.pki,h=a.pkcs12=
588 a.pkcs12||{},u={name:"ContentInfo",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},v={name:"PFX",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,capture:"version"},
589 u,{name:"PFX.macData",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",
589 -tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},D={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
590 -value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},y={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
590 +tagClass:m.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:m.Class.UNIVERSAL,type:m.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:m.Class.UNIVERSAL,type:m.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},C={name:"SafeBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,
591 +value:[{name:"SafeBag.bagId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},x={name:"Attribute",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,
592 capture:"oid"},{name:"Attribute.attrValues",tagClass:m.Class.UNIVERSAL,type:m.Type.SET,constructed:!0,capture:"values"}]},z={name:"CertBag",tagClass:m.Class.UNIVERSAL,type:m.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:m.Class.UNIVERSAL,type:m.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:m.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:m.Class.UNIVERSAL,type:m.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};
592 -g.pkcs12FromAsn1=function(b,l,x){"string"===typeof l?(x=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
593 +h.pkcs12FromAsn1=function(b,l,y){"string"===typeof l?(y=l,l=!0):void 0===l&&(l=!0);var u={};if(!m.validate(b,v,u,[]))throw l=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX."),l.errors=l,l;var n={version:u.version.charCodeAt(0),safeContents:[],getBags:function(b){var d={},e;"localKeyId"in b?e=b.localKeyId:"localKeyIdHex"in b&&(e=a.util.hexToBytes(b.localKeyIdHex));void 0===e&&!("friendlyName"in b)&&"bagType"in b&&(d[b.bagType]=c(n.safeContents,null,null,b.bagType));void 0!==e&&
594 (d.localKeyId=c(n.safeContents,"localKeyId",e,b.bagType));"friendlyName"in b&&(d.friendlyName=c(n.safeContents,"friendlyName",b.friendlyName,b.bagType));return d},getBagsByFriendlyName:function(a,b){return c(n.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return c(n.safeContents,"localKeyId",a,b)}};if(3!==u.version.charCodeAt(0))throw l=Error("PKCS#12 PFX of version other than 3 not supported."),l.version=u.version.charCodeAt(0),l;if(m.derToOid(u.contentType)!==k.oids.data)throw l=
594 -Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var y=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:y=a.md.sha1.create();w=20;break;case k.oids.sha256:y=a.md.sha256.create();w=32;break;case k.oids.sha384:y=a.md.sha384.create();w=48;break;case k.oids.sha512:y=a.md.sha512.create();
595 -w=64;break;case k.oids.md5:y=a.md.md5.create(),w=16}if(null===y)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=g.generateKey(x,r,3,z,w,y),r=a.hmac.create();r.start(y,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,x);return n};g.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
596 -8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var h=e.localKeyId,l;if(null!==h)h=a.util.hexToBytes(h);else if(e.generateLocalKeyId)if(c){var q=a.util.isArray(c)?c[0]:c;"string"===typeof q&&(q=k.certificateFromPem(q));h=a.md.sha1.create();h.update(m.toDer(k.certificateToAsn1(q)).getBytes());h=h.digest().getBytes()}else h=a.random.getBytes(20);q=[];null!==
597 -h&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,h)])]));"friendlyName"in e&&q.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
598 -0<q.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,q));h=[];q=[];null!==c&&(q=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<q.length;++u){c=q[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
599 -m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),h.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
595 +Error("Only PKCS#12 PFX in password integrity mode supported."),l.oid=m.derToOid(u.contentType),l;b=u.content.value[0];if(b.tagClass!==m.Class.UNIVERSAL||b.type!==m.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");b=d(b);if(u.mac){var x=null,w=0,r=m.derToOid(u.macAlgorithm);switch(r){case k.oids.sha1:x=a.md.sha1.create();w=20;break;case k.oids.sha256:x=a.md.sha256.create();w=32;break;case k.oids.sha384:x=a.md.sha384.create();w=48;break;case k.oids.sha512:x=a.md.sha512.create();
596 +w=64;break;case k.oids.md5:x=a.md.md5.create(),w=16}if(null===x)throw Error("PKCS#12 uses unsupported MAC algorithm: "+r);var r=new a.util.ByteBuffer(u.macSalt),z="macIterations"in u?parseInt(a.util.bytesToHex(u.macIterations),16):1,w=h.generateKey(y,r,3,z,w,x),r=a.hmac.create();r.start(x,w);r.update(b.value);if(r.getMac().getBytes()!==u.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?");}e(n,b.value,l,y);return n};h.toPkcs12Asn1=function(b,c,d,e){e=e||{};e.saltSize=e.saltSize||
597 +8;e.count=e.count||2048;e.algorithm=e.algorithm||e.encAlgorithm||"aes128";"useMac"in e||(e.useMac=!0);"localKeyId"in e||(e.localKeyId=null);"generateLocalKeyId"in e||(e.generateLocalKeyId=!0);var g=e.localKeyId,l;if(null!==g)g=a.util.hexToBytes(g);else if(e.generateLocalKeyId)if(c){var p=a.util.isArray(c)?c[0]:c;"string"===typeof p&&(p=k.certificateFromPem(p));g=a.md.sha1.create();g.update(m.toDer(k.certificateToAsn1(p)).getBytes());g=g.digest().getBytes()}else g=a.random.getBytes(20);p=[];null!==
598 +g&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.localKeyId).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,g)])]));"friendlyName"in e&&p.push(m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.friendlyName).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SET,!0,[m.create(m.Class.UNIVERSAL,m.Type.BMPSTRING,!1,e.friendlyName)])]));
599 +0<p.length&&(l=m.create(m.Class.UNIVERSAL,m.Type.SET,!0,p));g=[];p=[];null!==c&&(p=a.util.isArray(c)?c:[c]);for(var r=[],u=0;u<p.length;++u){c=p[u];"string"===typeof c&&(c=k.certificateFromPem(c));var n=0===u?l:void 0;c=k.certificateToAsn1(c);c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.certBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.x509Certificate).getBytes()),
600 +m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])])]),n]);r.push(c)}0<r.length&&(c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,r),c=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(c).getBytes())])]),g.push(c));c=null;null!==b&&(b=k.wrapRsaPrivateKey(k.privateKeyToAsn1(b)),
601 c=null===d?m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.keyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[b]),l]):m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.pkcs8ShroudedKeyBag).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[k.encryptPrivateKeyInfo(b,d,e)]),l]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[c]),b=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,
601 -[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),h.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,h);var y;e.useMac&&(h=a.md.sha1.create(),y=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=g.generateKey(d,y,3,e,20),d=a.hmac.create(),d.start(h,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),y=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
602 -!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,y.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
603 -m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),y])};g.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
602 +[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(b).getBytes())])]),g.push(b));l=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,g);var x;e.useMac&&(g=a.md.sha1.create(),x=new a.util.ByteBuffer(a.random.getBytes(e.saltSize)),e=e.count,b=h.generateKey(d,x,3,e,20),d=a.hmac.create(),d.start(g,b),d.update(m.toDer(l).getBytes()),d=d.getMac(),x=m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,
603 +!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.sha1).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.NULL,!1,"")]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,d.getBytes())]),m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,x.getBytes()),m.create(m.Class.UNIVERSAL,m.Type.INTEGER,!1,m.integerToDer(e).getBytes())]));return m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,
604 +m.Type.INTEGER,!1,m.integerToDer(3).getBytes()),m.create(m.Class.UNIVERSAL,m.Type.SEQUENCE,!0,[m.create(m.Class.UNIVERSAL,m.Type.OID,!1,m.oidToDer(k.oids.data).getBytes()),m.create(m.Class.CONTEXT_SPECIFIC,0,!0,[m.create(m.Class.UNIVERSAL,m.Type.OCTETSTRING,!1,m.toDer(l).getBytes())])]),x])};h.generateKey=a.pbe.generatePkcs12Key}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,
605 n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs12)return c.pkcs12;c.defined.pkcs12=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs12}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/pkcs12","require module ./asn1 ./hmac ./oids ./pkcs7asn1 ./pbe ./random ./rsa ./sha1 ./util ./x509".split(" "),
606 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=a.asn1,d=a.pki=a.pki||{};d.pemToDer=function(b){b=a.pem.decode(b)[0];if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert PEM to DER; PEM is encrypted.");return a.util.createBuffer(b.body)};d.privateKeyFromPem=function(b){b=a.pem.decode(b)[0];if("PRIVATE KEY"!==b.type&&"RSA PRIVATE KEY"!==b.type){var e=Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
607 e.headerType=b.type;throw e;}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert private key from PEM; PEM is encrypted.");b=c.fromDer(b.body);return d.privateKeyFromAsn1(b)};d.privateKeyToPem=function(b,e){var l={type:"RSA PRIVATE KEY",body:c.toDer(d.privateKeyToAsn1(b)).getBytes()};return a.pem.encode(l,{maxline:e})};d.privateKeyInfoToPem=function(b,d){var e={type:"PRIVATE KEY",body:c.toDer(b).getBytes()};return a.pem.encode(e,{maxline:d})}}if("function"!==typeof a)if("object"===
608 typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pki)return c.pki;c.defined.pki=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pki}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
609 Array.prototype.slice.call(arguments,0))};a("js/pki","require module ./asn1 ./oids ./pbe ./pem ./pbkdf2 ./pkcs12 ./pss ./rsa ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c=function(b,c,d,e){var h=a.util.createBuffer(),g=b.length>>1,l=g+(b.length&1),k=b.substr(0,l),l=b.substr(g,l);b=a.util.createBuffer();g=a.hmac.create();d=c+d;var m=Math.ceil(e/16);c=Math.ceil(e/20);g.start("MD5",k);k=a.util.createBuffer();b.putBytes(d);
609 -for(var q=0;q<m;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(q=0;q<c;++q)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
610 +for(var p=0;p<m;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),k.putBuffer(g.digest());g.start("SHA1",l);l=a.util.createBuffer();b.clear();b.putBytes(d);for(p=0;p<c;++p)g.start(null,null),g.update(b.getBytes()),b.putBuffer(g.digest()),g.start(null,null),g.update(b.bytes()+d),l.putBuffer(g.digest());h.putBytes(a.util.xorBytes(k.getBytes(),l.getBytes(),e));return h},d=function(b,c,d){d=!1;try{var e=b.deflate(c.fragment.getBytes());c.fragment=
611 a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},e=function(b,c,d){d=!1;try{var e=b.inflate(c.fragment.getBytes());c.fragment=a.util.createBuffer(e);c.length=e.length;d=!0}catch(h){}return d},l=function(b,c){var d=0;switch(c){case 1:d=b.getByte();break;case 2:d=b.getInt16();break;case 3:d=b.getInt24();break;case 4:d=b.getInt32()}return a.util.createBuffer(b.getBytes(d))},n=function(a,b,c){a.putInt(c.length(),b<<3);a.putBuffer(c)},m={Versions:{TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,
612 minor:2},TLS_1_2:{major:3,minor:3}}};m.SupportedVersions=[m.Versions.TLS_1_1,m.Versions.TLS_1_0];m.Version=m.SupportedVersions[0];m.MaxFragment=15360;m.ConnectionEnd={server:0,client:1};m.PRFAlgorithm={tls_prf_sha256:0};m.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};m.CipherType={stream:0,block:1,aead:2};m.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};m.CompressionMethod={none:0,deflate:1};m.ContentType={change_cipher_spec:20,alert:21,handshake:22,
613 application_data:23,heartbeat:24};m.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};m.Alert={};m.Alert.Level={warning:1,fatal:2};m.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,
@@ -617,20 +618,20 @@ l(c,1));g=d-(g-c.length());if(0<g){for(d=l(c,2);0<d.length();)e.extensions.push(
618 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});if(h)b.session.cipherSuite=m.getCipherSuite(e.cipher_suite);else for(d=a.util.createBuffer(e.cipher_suites.bytes());0<d.length()&&(b.session.cipherSuite=m.getCipherSuite(d.getBytes(2)),null===b.session.cipherSuite););if(null===b.session.cipherSuite)return b.error(b,{message:"No cipher suites in common.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure},cipherSuite:a.util.bytesToHex(e.cipher_suite)});
619 b.session.compressionMethod=h?e.compression_method:m.CompressionMethod.none}return e};m.createSecurityParameters=function(a,b){var c=a.entity===m.ConnectionEnd.client,d=b.random.bytes(),e=c?a.session.sp.client_random:d,c=c?d:m.createRandom().getBytes();a.session.sp={entity:a.entity,prf_algorithm:m.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,
620 compression_algorithm:a.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:e,server_random:c}};m.handleServerHello=function(a,b,c){b=m.parseHelloMessage(a,b,c);if(!a.fail){if(b.version.minor<=a.version.minor)a.version.minor=b.version.minor;else return a.error(a,{message:"Incompatible TLS version.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.protocol_version}});a.session.version=a.version;c=b.session_id.bytes();0<c.length&&c===a.session.id?
620 -(a.expect=D,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
621 -c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:x,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
621 +(a.expect=C,a.session.resuming=!0,a.session.sp.server_random=b.random.bytes()):(a.expect=k,a.session.resuming=!1,m.createSecurityParameters(a,b));a.session.id=c;a.process()}};m.handleClientHello=function(b,c,d){c=m.parseHelloMessage(b,c,d);if(!b.fail){var e=c.session_id.bytes();d=null;if(b.sessionCache)if(d=b.sessionCache.getSession(e),null===d)e="";else if(d.version.major!==c.version.major||d.version.minor>c.version.minor)d=null,e="";0===e.length&&(e=a.random.getBytes(32));b.session.id=e;b.session.clientHelloVersion=
622 +c.version;b.session.sp={};if(d)b.version=b.session.version=d.version,b.session.sp=d.sp;else{for(var h,e=1;e<m.SupportedVersions.length&&!(h=m.SupportedVersions[e],h.minor<=c.version.minor);++e);b.version={major:h.major,minor:h.minor};b.session.version=b.version}null!==d?(b.expect=H,b.session.resuming=!0,b.session.sp.client_random=c.random.bytes()):(b.expect=!1!==b.verifyClient?R:y,b.session.resuming=!1,m.createSecurityParameters(b,c));b.open=!0;m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,
623 data:m.createServerHello(b)}));b.session.resuming?(m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,data:m.createChangeCipherSpec()})),b.state.pending=m.createConnectionState(b),b.state.current.write=b.state.pending.write,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}))):(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)})),b.fail||(m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerKeyExchange(b)})),
623 -!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,h;c=[];try{for(;0<d.length();)e=
624 -l(d,3),h=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(h,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?g:x:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?g:x)):b.error(b,{message:e?"No server certificate provided.":
624 +!1!==b.verifyClient&&m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificateRequest(b)})),m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createServerHelloDone(b)}))));m.flush(b);b.process()}};m.handleCertificate=function(b,c,d){if(3>d)return b.error(b,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=l(c.fragment,3);var e,g;c=[];try{for(;0<d.length();)e=
625 +l(d,3),g=a.asn1.fromDer(e),e=a.pki.certificateFromAsn1(g,!0),c.push(e)}catch(k){return b.error(b,{message:"Could not parse certificate list.",cause:k,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}e=b.entity===m.ConnectionEnd.client;!e&&!0!==b.verifyClient||0!==c.length?0===c.length?b.expect=e?h:y:(e?b.session.serverCertificate=c[0]:b.session.clientCertificate=c[0],m.verifyCertificateChain(b,c)&&(b.expect=e?h:y)):b.error(b,{message:e?"No server certificate provided.":
626 "No client certificate provided.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});b.process()};m.handleServerKeyExchange=function(a,b,c){if(0<c)return a.error(a,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});a.expect=u;a.process()};m.handleClientKeyExchange=function(b,c,d){if(48>d)return b.error(b,{message:"Invalid key parameters. Only RSA is supported.",
627 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unsupported_certificate}});c=l(c.fragment,2).getBytes();d=null;if(b.getPrivateKey)try{d=b.getPrivateKey(b,b.session.serverCertificate),d=a.pki.privateKeyFromPem(d)}catch(e){b.error(b,{message:"Could not get private key.",cause:e,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}if(null===d)return b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
627 -try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=C);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
628 +try{var h=b.session.sp;h.pre_master_secret=d.decrypt(c);var g=b.session.clientHelloVersion;if(g.major!==h.pre_master_secret.charCodeAt(0)||g.minor!==h.pre_master_secret.charCodeAt(1))throw Error("TLS version rollback attack detected.");}catch(e){h.pre_master_secret=a.random.getBytes(48)}b.expect=H;null!==b.session.clientCertificate&&(b.expect=E);b.process()};m.handleCertificateRequest=function(a,b,c){if(3>c)return a.error(a,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,
629 description:m.Alert.Description.illegal_parameter}});b=b.fragment;b={certificate_types:l(b,1),certificate_authorities:l(b,2)};a.session.certificateRequest=b;a.expect=v;a.process()};m.handleCertificateVerify=function(b,c,d){if(2>d)return b.error(b,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});d=c.fragment;d.read-=4;c=d.bytes();d.read+=4;d=l(d,2).getBytes();var e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
630 e.putBuffer(b.session.sha1.digest());e=e.getBytes();try{if(!b.session.clientCertificate.publicKey.verify(e,d,"NONE"))throw Error("CertificateVerify signature does not match.");b.session.md5.update(c);b.session.sha1.update(c)}catch(h){return b.error(b,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.handshake_failure}})}b.expect=H;b.process()};m.handleServerHelloDone=function(b,c,d){if(0<d)return b.error(b,{message:"Invalid ServerHelloDone message. Invalid length.",
631 send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.record_overflow}});if(null===b.serverCertificate&&(c={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.insufficient_security}},d=b.verify(b,c.alert.description,0,[]),!0!==d)){if(d||0===d)"object"!==typeof d||a.util.isArray(d)?"number"===typeof d&&(c.alert.description=d):(d.message&&(c.message=d.message),d.alert&&(c.alert.description=d.alert));
632 return b.error(b,c)}null!==b.session.certificateRequest&&(c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createCertificate(b)}),m.queue(b,c));c=m.createRecord(b,{type:m.ContentType.handshake,data:m.createClientKeyExchange(b)});m.queue(b,c);b.expect=A;c=function(a,b){null!==a.session.certificateRequest&&null!==a.session.clientCertificate&&m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createCertificateVerify(a,b)}));m.queue(a,m.createRecord(a,{type:m.ContentType.change_cipher_spec,
632 -data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=D;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
633 -alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?y:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
633 +data:m.createChangeCipherSpec()}));a.state.pending=m.createConnectionState(a);a.state.current.write=a.state.pending.write;m.queue(a,m.createRecord(a,{type:m.ContentType.handshake,data:m.createFinished(a)}));a.expect=C;m.flush(a);a.process()};if(null===b.session.certificateRequest||null===b.session.clientCertificate)return c(b,null);m.getClientSignature(b,c)};m.handleChangeCipherSpec=function(a,b){if(1!==b.fragment.getByte())return a.error(a,{message:"Invalid ChangeCipherSpec message received.",send:!0,
634 +alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.illegal_parameter}});var c=a.entity===m.ConnectionEnd.client;if(a.session.resuming&&c||!a.session.resuming&&!c)a.state.pending=m.createConnectionState(a);a.state.current.read=a.state.pending.read;if(!a.session.resuming&&c||a.session.resuming&&!c)a.state.pending=null;a.expect=c?x:J;a.process()};m.handleFinished=function(b,d,e){e=d.fragment;e.read-=4;var h=e.bytes();e.read+=4;d=d.fragment.getBytes();e=a.util.createBuffer();e.putBuffer(b.session.md5.digest());
635 e.putBuffer(b.session.sha1.digest());var g=b.entity===m.ConnectionEnd.client;e=c(b.session.sp.master_secret,g?"server finished":"client finished",e.getBytes(),12);if(e.getBytes()!==d)return b.error(b,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decrypt_error}});b.session.md5.update(h);b.session.sha1.update(h);if(b.session.resuming&&g||!b.session.resuming&&!g)m.queue(b,m.createRecord(b,{type:m.ContentType.change_cipher_spec,
636 data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b.state.pending=null,m.queue(b,m.createRecord(b,{type:m.ContentType.handshake,data:m.createFinished(b)}));b.expect=g?z:P;b.handshaking=!1;++b.handshakes;b.peerCertificate=g?b.session.serverCertificate:b.session.clientCertificate;m.flush(b);b.isConnected=!0;b.connected(b);b.process()};m.handleAlert=function(a,b){var c=b.fragment,c={level:c.getByte(),description:c.getByte()},d;switch(c.description){case m.Alert.Description.close_notify:d=
637 "Connection closed.";break;case m.Alert.Description.unexpected_message:d="Unexpected message.";break;case m.Alert.Description.bad_record_mac:d="Bad record MAC.";break;case m.Alert.Description.decryption_failed:d="Decryption failed.";break;case m.Alert.Description.record_overflow:d="Record overflow.";break;case m.Alert.Description.decompression_failure:d="Decompression failed.";break;case m.Alert.Description.handshake_failure:d="Handshake failure.";break;case m.Alert.Description.bad_certificate:d=
@@ -639,20 +640,20 @@ data:m.createChangeCipherSpec()})),b.state.current.write=b.state.pending.write,b
640 break;case m.Alert.Description.no_renegotiation:d="Renegotiation not supported.";break;default:d="Unknown error."}if(c.description===m.Alert.Description.close_notify)return a.close();a.error(a,{message:d,send:!1,origin:a.entity===m.ConnectionEnd.client?"server":"client",alert:c});a.process()};m.handleHandshake=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt24();if(h>d.length())return b.fragmented=c,c.fragment=a.util.createBuffer(),d.read-=4,b.process();b.fragmented=null;d.read-=4;var g=d.bytes(h+
641 4);d.read+=4;e in I[b.entity][b.expect]?(b.entity!==m.ConnectionEnd.server||b.open||b.fail||(b.handshaking=!0,b.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:a.md.md5.create(),sha1:a.md.sha1.create()}),e!==m.HandshakeType.hello_request&&e!==m.HandshakeType.certificate_verify&&e!==m.HandshakeType.finished&&(b.session.md5.update(g),b.session.sha1.update(g)),I[b.entity][b.expect][e](b,c,h)):
642 m.handleUnexpected(b,c)};m.handleApplicationData=function(a,b){a.data.putBuffer(b.fragment);a.dataReady(a);a.process()};m.handleHeartbeat=function(b,c){var d=c.fragment,e=d.getByte(),h=d.getInt16(),d=d.getBytes(h);if(e===m.HeartbeatMessageType.heartbeat_request){if(b.handshaking||h>d.length)return b.process();m.queue(b,m.createRecord(b,{type:m.ContentType.heartbeat,data:m.createHeartbeat(m.HeartbeatMessageType.heartbeat_response,d)}));m.flush(b)}else if(e===m.HeartbeatMessageType.heartbeat_response){if(d!==
642 -b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,g=2,u=3,v=4,D=5,y=6,z=7,A=8,R=1,x=2,C=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
643 +b.expectedHeartbeatPayload)return b.process();b.heartbeatReceived&&b.heartbeatReceived(b,a.util.createBuffer(d))}b.process()};var k=1,h=2,u=3,v=4,C=5,x=6,z=7,A=8,R=1,y=2,E=3,H=4,J=5,P=6,r=m.handleUnexpected,N=m.handleChangeCipherSpec,U=m.handleAlert,L=m.handleHandshake,Y=m.handleApplicationData,K=m.handleHeartbeat,ea=[];ea[m.ConnectionEnd.client]=[[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];ea[m.ConnectionEnd.server]=[[r,U,L,r,K],[r,
644 U,L,r,K],[r,U,L,r,K],[r,U,L,r,K],[N,U,r,r,K],[r,U,L,r,K],[r,U,L,Y,K],[r,U,L,r,K]];var N=m.handleHelloRequest,U=m.handleCertificate,L=m.handleServerKeyExchange,Y=m.handleCertificateRequest,K=m.handleServerHelloDone,V=m.handleFinished,I=[];I[m.ConnectionEnd.client]=[[r,r,m.handleServerHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,U,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,L,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,Y,K,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,K,r,r,r,r,r,r],
645 [N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[N,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];I[m.ConnectionEnd.server]=[[r,m.handleClientHello,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,U,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleClientKeyExchange,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,m.handleCertificateVerify,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,
646 r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,V],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r],[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]];m.generateKeys=function(a,b){var d=b.client_random+b.server_random;a.session.resuming||(b.master_secret=c(b.pre_master_secret,"master secret",d,48).bytes(),b.pre_master_secret=null);var d=b.server_random+b.client_random,e=2*b.mac_key_length+2*b.enc_key_length,h=a.version.major===m.Versions.TLS_1_0.major&&a.version.minor===m.Versions.TLS_1_0.minor;h&&(e+=2*b.fixed_iv_length);d=
647 c(b.master_secret,"key expansion",d,e);e={client_write_MAC_key:d.getBytes(b.mac_key_length),server_write_MAC_key:d.getBytes(b.mac_key_length),client_write_key:d.getBytes(b.enc_key_length),server_write_key:d.getBytes(b.enc_key_length)};h&&(e.client_write_IV=d.getBytes(b.fixed_iv_length),e.server_write_IV=d.getBytes(b.fixed_iv_length));return e};m.createConnectionState=function(a){var b=a.entity===m.ConnectionEnd.client,c=function(){var a={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,
647 -cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},g={read:c(),write:c()};g.read.update=function(a,b){g.read.cipherFunction(b,g.read)?g.read.compressFunction(a,b,g.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
648 -a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};g.write.update=function(a,b){g.write.compressFunction(a,b,g.write)?g.write.cipherFunction(b,g.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
649 -return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),g.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,g.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(g,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:g.read.compressFunction=e;g.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
650 -}return g};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
651 -function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var q=a.util.createBuffer();
652 -n(q,2,k);n(l,2,q);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
648 +cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){4294967295===a.sequenceNumber[1]?(a.sequenceNumber[1]=0,++a.sequenceNumber[0]):++a.sequenceNumber[1]}};return a},h={read:c(),write:c()};h.read.update=function(a,b){h.read.cipherFunction(b,h.read)?h.read.compressFunction(a,b,h.read)||a.error(a,{message:"Could not decompress record.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.decompression_failure}}):
649 +a.error(a,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_record_mac}});return!a.fail};h.write.update=function(a,b){h.write.compressFunction(a,b,h.write)?h.write.cipherFunction(b,h.write)||a.error(a,{message:"Could not encrypt record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):a.error(a,{message:"Could not compress record.",send:!1,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}});
650 +return!a.fail};if(a.session)switch(c=a.session.sp,a.session.cipherSuite.initSecurityParameters(c),c.keys=m.generateKeys(a,c),h.read.macKey=b?c.keys.server_write_MAC_key:c.keys.client_write_MAC_key,h.write.macKey=b?c.keys.client_write_MAC_key:c.keys.server_write_MAC_key,a.session.cipherSuite.initConnectionState(h,a,c),c.compression_algorithm){case m.CompressionMethod.none:break;case m.CompressionMethod.deflate:h.read.compressFunction=e;h.write.compressFunction=d;break;default:throw Error("Unsupported compression algorithm.");
651 +}return h};m.createRandom=function(){var b=new Date,b=+b+6E4*b.getTimezoneOffset(),c=a.util.createBuffer();c.putInt32(b);c.putBytes(a.random.getBytes(28));return c};m.createRecord=function(a,b){return b.data?{type:b.type,version:{major:a.version.major,minor:a.version.minor},length:b.data.length(),fragment:b.data}:null};m.createAlert=function(b,c){var d=a.util.createBuffer();d.putByte(c.level);d.putByte(c.description);return m.createRecord(b,{type:m.ContentType.alert,data:d})};m.createClientHello=
652 +function(b){b.session.clientHelloVersion={major:b.version.major,minor:b.version.minor};for(var c=a.util.createBuffer(),d=0;d<b.cipherSuites.length;++d){var e=b.cipherSuites[d];c.putByte(e.id[0]);c.putByte(e.id[1])}var h=c.length(),d=a.util.createBuffer();d.putByte(m.CompressionMethod.none);var g=d.length(),e=a.util.createBuffer();if(b.virtualHost){var l=a.util.createBuffer();l.putByte(0);l.putByte(0);var k=a.util.createBuffer();k.putByte(0);n(k,2,a.util.createBuffer(b.virtualHost));var p=a.util.createBuffer();
653 +n(p,2,k);n(l,2,p);e.putBuffer(l)}l=e.length();0<l&&(l+=2);k=b.session.id;h=k.length+1+2+4+28+2+h+1+g+l;g=a.util.createBuffer();g.putByte(m.HandshakeType.client_hello);g.putInt24(h);g.putByte(b.version.major);g.putByte(b.version.minor);g.putBytes(b.session.sp.client_random);n(g,1,a.util.createBuffer(k));n(g,2,c);n(g,1,d);0<l&&n(g,2,e);return g};m.createServerHello=function(b){var c=b.session.id,d=c.length+1+2+4+28+2+1,e=a.util.createBuffer();e.putByte(m.HandshakeType.server_hello);e.putInt24(d);e.putByte(b.version.major);
654 e.putByte(b.version.minor);e.putBytes(b.session.sp.server_random);n(e,1,a.util.createBuffer(c));e.putByte(b.session.cipherSuite.id[0]);e.putByte(b.session.cipherSuite.id[1]);e.putByte(b.session.compressionMethod);return e};m.createCertificate=function(b){var c=b.entity===m.ConnectionEnd.client,d=null;b.getCertificate&&(d=b.getCertificate(b,c?b.session.certificateRequest:b.session.extensions.server_name.serverNameList));var e=a.util.createBuffer();if(null!==d)try{a.util.isArray(d)||(d=[d]);for(var h=
654 -null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var q=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(q.bytes(),!1));
655 -var x=a.util.createBuffer();n(x,3,q);e.putBuffer(x)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(r){return b.error(b,{message:"Could not send certificate list.",cause:r,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
655 +null,g=0;g<d.length;++g){var l=a.pem.decode(d[g])[0];if("CERTIFICATE"!==l.type&&"X509 CERTIFICATE"!==l.type&&"TRUSTED CERTIFICATE"!==l.type){var k=Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');k.headerType=l.type;throw k;}if(l.procType&&"ENCRYPTED"===l.procType.type)throw Error("Could not convert certificate from PEM; PEM is encrypted.");var p=a.util.createBuffer(l.body);null===h&&(h=a.asn1.fromDer(p.bytes(),!1));
656 +var r=a.util.createBuffer();n(r,3,p);e.putBuffer(r)}d=a.pki.certificateFromAsn1(h);c?b.session.clientCertificate=d:b.session.serverCertificate=d}catch(u){return b.error(b,{message:"Could not send certificate list.",cause:u,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.bad_certificate}})}b=3+e.length();c=a.util.createBuffer();c.putByte(m.HandshakeType.certificate);c.putInt24(b);n(c,3,e);return c};m.createClientKeyExchange=function(b){var c=a.util.createBuffer();c.putByte(b.session.clientHelloVersion.major);
657 c.putByte(b.session.clientHelloVersion.minor);c.putBytes(a.random.getBytes(46));var d=b.session.sp;d.pre_master_secret=c.getBytes();c=b.session.serverCertificate.publicKey.encrypt(d.pre_master_secret);b=c.length+2;d=a.util.createBuffer();d.putByte(m.HandshakeType.client_key_exchange);d.putInt24(b);d.putInt16(c.length);d.putBytes(c);return d};m.createServerKeyExchange=function(b){return a.util.createBuffer()};m.getClientSignature=function(b,c){var d=a.util.createBuffer();d.putBuffer(b.session.md5.digest());
658 d.putBuffer(b.session.sha1.digest());d=d.getBytes();b.getSignature=b.getSignature||function(b,c,d){var e=null;if(b.getPrivateKey)try{e=b.getPrivateKey(b,b.session.clientCertificate),e=a.pki.privateKeyFromPem(e)}catch(h){b.error(b,{message:"Could not get private key.",cause:h,send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}})}null===e?b.error(b,{message:"No private key set.",send:!0,alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.internal_error}}):
659 c=e.sign(c,null);d(b,c)};b.getSignature(b,d,c)};m.createCertificateVerify=function(b,c){var d=c.length+2,e=a.util.createBuffer();e.putByte(m.HandshakeType.certificate_verify);e.putInt24(d);e.putInt16(c.length);e.putBytes(c);return e};m.createCertificateRequest=function(b){var c=a.util.createBuffer();c.putByte(1);var d=a.util.createBuffer(),e;for(e in b.caStore.certs){var h=a.pki.distinguishedNameToAsn1(b.caStore.certs[e].subject);d.putBuffer(a.asn1.toDer(h))}b=1+c.length()+2+d.length();e=a.util.createBuffer();
@@ -676,17 +677,17 @@ alert:{level:m.Alert.Level.fatal,description:m.Alert.Description.unexpected_mess
677 m.queue(g,m.createAlert(g,{level:m.Alert.Level.warning,description:m.Alert.Description.close_notify})),m.flush(g);g.closed(g)}g.reset(a)};return g};a.tls=a.tls||{};for(var W in m)"function"!==typeof m[W]&&(a.tls[W]=m[W]);a.tls.prf_tls1=c;a.tls.hmac_sha1=function(b,c,d){var e=a.hmac.create();e.start("SHA1",b);b=a.util.createBuffer();b.putInt32(c[0]);b.putInt32(c[1]);b.putByte(d.type);b.putByte(d.version.major);b.putByte(d.version.minor);b.putInt16(d.length);b.putBytes(d.fragment.bytes());e.update(b.getBytes());
678 return e.digest().getBytes()};a.tls.createSessionCache=m.createSessionCache;a.tls.createConnection=m.createConnection}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.tls)return c.tls;c.defined.tls=!0;for(var l=0;l<e.length;++l)e[l](c);return c.tls}},
679 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/tls","require module ./asn1 ./hmac ./md ./pem ./pki ./random ./util".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,e,l){e=e.entity===a.tls.ConnectionEnd.client;b.read.cipherState={init:!1,cipher:a.cipher.createDecipher("AES-CBC",
679 -e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var h=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
680 -c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),h=!0);return h}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
681 -d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),h=c.macLength,q=a.random.getBytesSync(h),A=e.output.length();A>=h?(b.fragment=e.output.getBytes(A-h),q=e.output.getBytes(h)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
682 -b.fragment.length();h=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(q);q=A.digest().getBytes();A.start(null,null);A.update(h);h=A.digest().getBytes();return q===h&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
680 +e?l.keys.server_write_key:l.keys.client_write_key),iv:e?l.keys.server_write_IV:l.keys.client_write_IV};b.write.cipherState={init:!1,cipher:a.cipher.createCipher("AES-CBC",e?l.keys.client_write_key:l.keys.server_write_key),iv:e?l.keys.client_write_IV:l.keys.server_write_IV};b.read.cipherFunction=n;b.write.cipherFunction=d;b.read.macLength=b.write.macLength=l.mac_length;b.read.macFunction=b.write.macFunction=m.hmac_sha1}function d(b,c){var g=!1,l=c.macFunction(c.macKey,c.sequenceNumber,b);b.fragment.putBytes(l);
681 +c.updateSequenceNumber();l=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:a.random.getBytesSync(16);c.cipherState.init=!0;var k=c.cipherState.cipher;k.start({iv:l});b.version.minor>=m.Versions.TLS_1_1.minor&&k.output.putBytes(l);k.update(b.fragment);k.finish(e)&&(b.fragment=k.output,b.length=b.fragment.length(),g=!0);return g}function e(a,b,c){c||(a-=b.length()%a,b.fillWithByte(a-1,a));return!0}function l(a,b,c){a=!0;if(c){c=b.length();for(var d=b.last(),e=c-1-
682 +d;e<c-1;++e)a=a&&b.at(e)==d;a&&b.truncate(d+1)}return a}function n(b,c){var d=!1;++k;d=b.version.minor===m.Versions.TLS_1_0.minor?c.cipherState.init?null:c.cipherState.iv:b.fragment.getBytes(16);c.cipherState.init=!0;var e=c.cipherState.cipher;e.start({iv:d});e.update(b.fragment);var d=e.finish(l),g=c.macLength,p=a.random.getBytesSync(g),A=e.output.length();A>=g?(b.fragment=e.output.getBytes(A-g),p=e.output.getBytes(g)):b.fragment=e.output.getBytes();b.fragment=a.util.createBuffer(b.fragment);b.length=
683 +b.fragment.length();g=c.macFunction(c.macKey,c.sequenceNumber,b);c.updateSequenceNumber();e=c.macKey;A=a.hmac.create();A.start("SHA1",e);A.update(p);p=A.digest().getBytes();A.start(null,null);A.update(g);g=A.digest().getBytes();return p===g&&d}var m=a.tls;m.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=16;a.block_length=16;
684 a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=20},initConnectionState:c};m.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(a){a.bulk_cipher_algorithm=m.BulkCipherAlgorithm.aes;a.cipher_type=m.CipherType.block;a.enc_key_length=32;a.block_length=16;a.fixed_iv_length=16;a.record_iv_length=16;a.mac_algorithm=m.MACAlgorithm.hmac_sha1;a.mac_length=20;a.mac_key_length=
685 20},initConnectionState:c};var k=0}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.aesCipherSuites)return c.aesCipherSuites;c.defined.aesCipherSuites=!0;for(var l=0;l<e.length;++l)e[l](c);return c.aesCipherSuites}},l=a;a=function(b,c){v="string"===
686 typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/aesCipherSuites",["require","module","./aes","./tls"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.debug=a.debug||{};a.debug.storage={};a.debug.get=function(b,c){var d;"undefined"===typeof b?d=a.debug.storage:b in a.debug.storage&&(d="undefined"===typeof c?a.debug.storage[b]:
687 a.debug.storage[b][c]);return d};a.debug.set=function(b,c,d){b in a.debug.storage||(a.debug.storage[b]={});a.debug.storage[b][c]=d};a.debug.clear=function(b,c){"undefined"===typeof b?a.debug.storage={}:b in a.debug.storage&&("undefined"===typeof c?delete a.debug.storage[b]:delete a.debug.storage[b][c])}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=
688 function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.debug)return c.debug;c.defined.debug=!0;for(var l=0;l<e.length;++l)e[l](c);return c.debug}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/debug",["require","module"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();
688 -(function(){function b(a){function c(b,d,e,h){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,q=Math.ceil(c/h)+e,n=new a.util.ByteBuffer,y=e;y<q;++y){n.putInt32(y);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(h))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var g=Math.ceil(c.n.bitLength()/8),q;do q=(new d(a.util.bytesToHex(e.getBytesSync(g)),
689 -16)).mod(c.n);while(q.equals(d.ZERO));q=a.util.hexToBytes(q.toString(16));g-=q.length;0<g&&(q=a.util.fillString(String.fromCharCode(0),g)+q);g=c.encrypt(q,"NONE");q=b.generate(q,l);return{encapsulation:g,key:q}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
689 +(function(){function b(a){function c(b,d,e,g){b.generate=function(b,c){for(var l=new a.util.ByteBuffer,p=Math.ceil(c/g)+e,n=new a.util.ByteBuffer,x=e;x<p;++x){n.putInt32(x);d.start();d.update(b+n.getBytes());var v=d.digest();l.putBytes(v.getBytes(g))}l.truncate(l.length()-c);return l.getBytes()}}a.kem=a.kem||{};var d=a.jsbn.BigInteger;a.kem.rsa={};a.kem.rsa.create=function(b,c){c=c||{};var e=c.prng||a.random;return{encrypt:function(c,l){var h=Math.ceil(c.n.bitLength()/8),p;do p=(new d(a.util.bytesToHex(e.getBytesSync(h)),
690 +16)).mod(c.n);while(p.equals(d.ZERO));p=a.util.hexToBytes(p.toString(16));h-=p.length;0<h&&(p=a.util.fillString(String.fromCharCode(0),h)+p);h=c.encrypt(p,"NONE");p=b.generate(p,l);return{encapsulation:h,key:p}},decrypt:function(a,c,d){a=a.decrypt(c,"NONE");return b.generate(a,d)}}};a.kem.kdf1=function(a,b){c(this,a,0,b||a.digestLength)};a.kem.kdf2=function(a,b){c(this,a,1,b||a.digestLength)}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===
691 typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.kem)return c.kem;c.defined.kem=!0;for(var l=0;l<e.length;++l)e[l](c);return c.kem}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/kem",["require","module","./util","./random",
692 "./jsbn"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){a.log=a.log||{};a.log.levels="none error warning info debug verbose max".split(" ");var c={},d=[],e=null;a.log.LEVEL_LOCKED=2;a.log.NO_LEVEL_CHECK=4;a.log.INTERPOLATE=8;for(var l=0;l<a.log.levels.length;++l){var n=a.log.levels[l];c[n]={index:l,name:n.toUpperCase()}}a.log.logMessage=function(b){for(var e=c[b.level].index,l=0;l<d.length;++l){var m=d[l];m.flags&a.log.NO_LEVEL_CHECK?m.f(b):e<=c[m.level].index&&
693 m.f(m,b)}};a.log.prepareStandard=function(a){"standard"in a||(a.standard=c[a.level].name+" ["+a.category+"] "+a.message)};a.log.prepareFull=function(b){if(!("full"in b)){var c=[b.message],c=c.concat([]);b.full=a.util.format.apply(this,c)}};a.log.prepareStandardFull=function(b){"standardFull"in b||(a.log.prepareStandard(b),b.standardFull=b.standard)};n=["error","warning","info","debug","verbose"];for(l=0;l<n.length;++l)(function(b){a.log[b]=function(c,d){var e=Array.prototype.slice.call(arguments).slice(2);
@@ -702,48 +703,48 @@ u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.value).getBytes());else if
703 u.create(u.Class.UNIVERSAL,u.Type.GENERALIZEDTIME,!1,u.dateToGeneralizedTime(e))}return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[c])])}function m(b){return[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.algorithm).getBytes()),u.create(u.Class.UNIVERSAL,
704 u.Type.OCTETSTRING,!1,b.parameter.getBytes())]),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,b.content.getBytes())])]}function k(b,c,d){var e={};if(!u.validate(c,d,e,[]))throw b=Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message."),b.errors=b,b;if(u.derToOid(e.contentType)!==a.pki.oids.data)throw Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(e.encryptedContent){c="";if(a.util.isArray(e.encryptedContent))for(d=
705 0;d<e.encryptedContent.length;++d){if(e.encryptedContent[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");c+=e.encryptedContent[d].value}else c=e.encryptedContent;b.encryptedContent={algorithm:u.derToOid(e.encAlgorithm),parameter:a.util.createBuffer(e.encParameter.value),content:a.util.createBuffer(c)}}if(e.content){c="";if(a.util.isArray(e.content))for(d=0;d<e.content.length;++d){if(e.content[d].type!==u.Type.OCTETSTRING)throw Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");
705 -c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function g(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
706 +c+=e.content[d].value}else c=e.content;b.content=a.util.createBuffer(c)}b.version=e.version.charCodeAt(0);return b.rawCapture=e}function h(b){if(void 0===b.encryptedContent.key)throw Error("Symmetric key not available.");if(void 0===b.content){var c;switch(b.encryptedContent.algorithm){case a.pki.oids["aes128-CBC"]:case a.pki.oids["aes192-CBC"]:case a.pki.oids["aes256-CBC"]:c=a.aes.createDecryptionCipher(b.encryptedContent.key);break;case a.pki.oids.desCBC:case a.pki.oids["des-EDE3-CBC"]:c=a.des.createDecryptionCipher(b.encryptedContent.key);
707 break;default:throw Error("Unsupported symmetric cipher, OID "+b.encryptedContent.algorithm);}c.start(b.encryptedContent.parameter);c.update(b.encryptedContent.content);if(!c.finish())throw Error("Symmetric decryption failed.");b.content=c.output}}var u=a.asn1,v=a.pkcs7=a.pkcs7||{};v.messageFromPem=function(b){b=a.pem.decode(b)[0];if("PKCS7"!==b.type){var c=Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');c.headerType=b.type;throw c;}if(b.procType&&"ENCRYPTED"===
708 b.procType.type)throw Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");b=u.fromDer(b.body);return v.messageFromAsn1(b)};v.messageToPem=function(b,c){var d={type:"PKCS7",body:u.toDer(b.toAsn1()).getBytes()};return a.pem.encode(d,{maxline:c})};v.messageFromAsn1=function(b){var c={},d=[];if(!u.validate(b,v.asn1.contentInfoValidator,c,d))throw c=Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo."),c.errors=d,c;d=u.derToOid(c.contentType);switch(d){case a.pki.oids.envelopedData:d=
709 v.createEnvelopedData();break;case a.pki.oids.encryptedData:d=v.createEncryptedData();break;case a.pki.oids.signedData:d=v.createSignedData();break;default:throw Error("Cannot read PKCS#7 message. ContentType with OID "+d+" is not (yet) supported.");}d.fromAsn1(c.content.value[0]);return d};v.createSignedData=function(){var b=null;return b={type:a.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(c){k(b,
710 c,v.asn1.signedDataValidator);b.certificates=[];b.crls=[];b.digestAlgorithmIdentifiers=[];b.contentInfo=null;b.signerInfos=[];c=b.rawCapture.certificates.value;for(var d=0;d<c.length;++d)b.certificates.push(a.pki.certificateFromAsn1(c[d]))},toAsn1:function(){b.contentInfo||b.sign();for(var c=[],d=0;d<b.certificates.length;++d)c.push(a.pki.certificateToAsn1(b.certificates[d]));var d=[],e=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,
711 u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.digestAlgorithmIdentifiers),b.contentInfo])]);0<c.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,0,!0,c));0<d.length&&e.value[0].value.push(u.create(u.Class.CONTEXT_SPECIFIC,1,!0,d));e.value[0].value.push(u.create(u.Class.UNIVERSAL,u.Type.SET,!0,b.signerInfos));return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),
712 e])},addSigner:function(c){var d=c.issuer,e=c.serialNumber;c.certificate&&(e=c.certificate,"string"===typeof e&&(e=a.pki.certificateFromPem(e)),d=e.issuer.attributes,e=e.serialNumber);var g=c.key;if(!g)throw Error("Could not add PKCS#7 signer; no private key specified.");"string"===typeof g&&(g=a.pki.privateKeyFromPem(g));var h=c.digestAlgorithm||a.pki.oids.sha1;switch(h){case a.pki.oids.sha1:case a.pki.oids.sha256:case a.pki.oids.sha384:case a.pki.oids.sha512:case a.pki.oids.md5:break;default:throw Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+
712 -h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var q=c[m];if(!l&&q.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&q.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
713 +h);}c=c.authenticatedAttributes||[];if(0<c.length){for(var l=!1,k=!1,m=0;m<c.length;++m){var p=c[m];if(!l&&p.type===a.pki.oids.contentType){if(l=!0,k)break}else if(!k&&p.type===a.pki.oids.messageDigest&&(k=!0,l))break}if(!l||!k)throw Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.");}b.signers.push({key:g,version:1,issuer:d,serialNumber:e,digestAlgorithm:h,
714 signatureAlgorithm:a.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:c,unauthenticatedAttributes:[]})},sign:function(){if("object"!==typeof b.content||null===b.contentInfo)if(b.contentInfo=u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(a.pki.oids.data).getBytes())]),"content"in b){var c;b.content instanceof a.util.ByteBuffer?c=b.content.bytes():"string"===typeof b.content&&(c=a.util.encodeUtf8(b.content));b.contentInfo.value.push(u.create(u.Class.CONTEXT_SPECIFIC,
715 0,!0,[u.create(u.Class.UNIVERSAL,u.Type.OCTETSTRING,!1,c)]))}if(0!==b.signers.length){c={};for(var d=0;d<b.signers.length;++d){var e=b.signers[d],g=e.digestAlgorithm;g in c||(c[g]=a.md[a.pki.oids[g]].create());e.md=0===e.authenticatedAttributes.length?c[g]:a.md[a.pki.oids[g]].create()}b.digestAlgorithmIdentifiers=[];for(g in c)b.digestAlgorithmIdentifiers.push(u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(g).getBytes()),u.create(u.Class.UNIVERSAL,
716 u.Type.NULL,!1,"")]));if(2>b.contentInfo.value.length)throw Error("Could not sign PKCS#7 message; there is no content to sign.");var g=u.derToOid(b.contentInfo.value[0].value),d=b.contentInfo.value[1],d=d.value[0],h=u.toDer(d);h.getByte();u.getBerValueLength(h);var h=h.getBytes(),k;for(k in c)c[k].start().update(h);k=new Date;for(d=0;d<b.signers.length;++d){e=b.signers[d];if(0===e.authenticatedAttributes.length){if(g!==a.pki.oids.data)throw Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.");
716 -}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var q=e.authenticatedAttributes[m];q.type===a.pki.oids.messageDigest?q.value=c[e.digestAlgorithm].digest():q.type!==a.pki.oids.signingTime||q.value||(q.value=k);h.value.push(n(q));e.authenticatedAttributesAsn1.value.push(n(q))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
717 +}else{e.authenticatedAttributesAsn1=u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var h=u.create(u.Class.UNIVERSAL,u.Type.SET,!0,[]),m=0;m<e.authenticatedAttributes.length;++m){var p=e.authenticatedAttributes[m];p.type===a.pki.oids.messageDigest?p.value=c[e.digestAlgorithm].digest():p.type!==a.pki.oids.signingTime||p.value||(p.value=k);h.value.push(n(p));e.authenticatedAttributesAsn1.value.push(n(p))}h=u.toDer(h).getBytes();e.md.start().update(h)}e.signature=e.key.sign(e.md,"RSASSA-PKCS1-V1_5")}c=
718 b;g=b.signers;k=[];for(d=0;d<g.length;++d)k.push(l(g[d]));c.signerInfos=k}},verify:function(){throw Error("PKCS#7 signature verification not yet implemented.");},addCertificate:function(c){"string"===typeof c&&(c=a.pki.certificateFromPem(c));b.certificates.push(c)},addCertificateRevokationList:function(a){throw Error("PKCS#7 CRL support not yet implemented.");}}};v.createEncryptedData=function(){var b=null;return b={type:a.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},
718 -fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);g(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
719 +fromAsn1:function(a){k(b,a,v.asn1.encryptedDataValidator)},decrypt:function(a){void 0!==a&&(b.encryptedContent.key=a);h(b)}}};v.createEnvelopedData=function(){var b=null;return b={type:a.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:a.pki.oids["aes256-CBC"]},fromAsn1:function(a){var d=k(b,a,v.asn1.envelopedDataValidator);a=b;for(var d=d.recipientInfos.value,e=[],g=0;g<d.length;++g)e.push(c(d[g]));a.recipients=e},toAsn1:function(){return u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,
720 !0,[u.create(u.Class.UNIVERSAL,u.Type.OID,!1,u.oidToDer(b.type).getBytes()),u.create(u.Class.CONTEXT_SPECIFIC,0,!0,[u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,[u.create(u.Class.UNIVERSAL,u.Type.INTEGER,!1,u.integerToDer(b.version).getBytes()),u.create(u.Class.UNIVERSAL,u.Type.SET,!0,e(b.recipients)),u.create(u.Class.UNIVERSAL,u.Type.SEQUENCE,!0,m(b.encryptedContent))])])])},findRecipient:function(a){for(var c=a.issuer.attributes,d=0;d<b.recipients.length;++d){var e=b.recipients[d],g=e.issuer;if(e.serialNumber===
721 a.serialNumber&&g.length===c.length){for(var h=!0,l=0;l<c.length;++l)if(g[l].type!==c[l].type||g[l].value!==c[l].value){h=!1;break}if(h)return e}}return null},decrypt:function(c,d){if(void 0===b.encryptedContent.key&&void 0!==c&&void 0!==d)switch(c.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:case a.pki.oids.desCBC:var e=d.decrypt(c.encryptedContent.content);b.encryptedContent.key=a.util.createBuffer(e);break;default:throw Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm);
721 -}g(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
722 +}h(b)},addRecipient:function(c){b.recipients.push({version:0,issuer:c.issuer.attributes,serialNumber:c.serialNumber,encryptedContent:{algorithm:a.pki.oids.rsaEncryption,key:c.publicKey}})},encrypt:function(c,d){if(void 0===b.encryptedContent.content){d=d||b.encryptedContent.algorithm;c=c||b.encryptedContent.key;var e,g,h;switch(d){case a.pki.oids["aes128-CBC"]:g=e=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes192-CBC"]:e=24;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["aes256-CBC"]:e=
723 32;g=16;h=a.aes.createEncryptionCipher;break;case a.pki.oids["des-EDE3-CBC"]:e=24;g=8;h=a.des.createEncryptionCipher;break;default:throw Error("Unsupported symmetric cipher, OID "+d);}if(void 0===c)c=a.util.createBuffer(a.random.getBytes(e));else if(c.length()!=e)throw Error("Symmetric key has wrong length; got "+c.length()+" bytes, expected "+e+".");b.encryptedContent.algorithm=d;b.encryptedContent.key=c;b.encryptedContent.parameter=a.util.createBuffer(a.random.getBytes(g));e=h(c);e.start(b.encryptedContent.parameter.copy());
724 e.update(b.content);if(!e.finish())throw Error("Symmetric encryption failed.");b.encryptedContent.content=e.output}for(e=0;e<b.recipients.length;++e)if(g=b.recipients[e],void 0===g.encryptedContent.content)switch(g.encryptedContent.algorithm){case a.pki.oids.rsaEncryption:g.encryptedContent.content=g.encryptedContent.key.encrypt(b.encryptedContent.key.data);break;default:throw Error("Unsupported asymmetric cipher, OID "+g.encryptedContent.algorithm);}}}}}if("function"!==typeof a)if("object"===typeof module&&
725 module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.pkcs7)return c.pkcs7;c.defined.pkcs7=!0;for(var l=0;l<e.length;++l)e[l](c);return c.pkcs7}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,
726 Array.prototype.slice.call(arguments,0))};a("js/pkcs7","require module ./aes ./asn1 ./des ./oids ./pem ./pkcs7asn1 ./random ./util ./x509".split(" "),function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){function c(b,d){var e=d.toString(16);"8"<=e[0]&&(e="00"+e);e=a.util.hexToBytes(e);b.putInt32(e.length);b.putBytes(e)}function d(a,b){a.putInt32(b.length);a.putString(b)}function e(){for(var b=a.md.sha1.create(),c=arguments.length,d=0;d<c;++d)b.update(arguments[d]);
726 -return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var g=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+g+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),y=Math.floor(w.length/66)+1;n+="Public-Lines: "+y+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(y=w.length()+16-1,y-=y%16,b=e(w.bytes()),b.truncate(b.length()-
727 -y+w.length()),w.putBuffer(b),y=a.util.createBuffer(),y.putBuffer(e("\x00\x00\x00\x00",l)),y.putBuffer(e("\x00\x00\x00\u0001",l)),y=a.aes.createEncryptionCipher(y.truncate(8),"CBC"),y.start(a.util.createBuffer().fillWithByte(0,16)),y.update(w.copy()),y.finish(),y=y.output,y.truncate(16),b=a.util.encode64(y.bytes(),64)):b=a.util.encode64(w.bytes(),64);y=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+y+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);y=a.util.createBuffer();d(y,"ssh-rsa");d(y,
728 -g);d(y,k);y.putInt32(v.length());y.putBuffer(v);y.putInt32(w.length());y.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(y.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
729 -function(b,e){e=e||{};var l=e.md||a.md.md5.create(),g=a.util.createBuffer();d(g,"ssh-rsa");c(g,b.e);c(g,b.n);l.start();l.update(g.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
727 +return b.digest()}var l=a.ssh=a.ssh||{};l.privateKeyToPutty=function(b,l,k){k=k||"";l=l||"";var h=""===l?"none":"aes256-cbc",n;n="PuTTY-User-Key-File-2: ssh-rsa\r\n"+("Encryption: "+h+"\r\n")+("Comment: "+k+"\r\n");var v=a.util.createBuffer();d(v,"ssh-rsa");c(v,b.e);c(v,b.n);var w=a.util.encode64(v.bytes(),64),x=Math.floor(w.length/66)+1;n+="Public-Lines: "+x+"\r\n";n+=w;w=a.util.createBuffer();c(w,b.d);c(w,b.p);c(w,b.q);c(w,b.qInv);l?(x=w.length()+16-1,x-=x%16,b=e(w.bytes()),b.truncate(b.length()-
728 +x+w.length()),w.putBuffer(b),x=a.util.createBuffer(),x.putBuffer(e("\x00\x00\x00\x00",l)),x.putBuffer(e("\x00\x00\x00\u0001",l)),x=a.aes.createEncryptionCipher(x.truncate(8),"CBC"),x.start(a.util.createBuffer().fillWithByte(0,16)),x.update(w.copy()),x.finish(),x=x.output,x.truncate(16),b=a.util.encode64(x.bytes(),64)):b=a.util.encode64(w.bytes(),64);x=Math.floor(b.length/66)+1;n+="\r\nPrivate-Lines: "+x+"\r\n";n+=b;l=e("putty-private-key-file-mac-key",l);x=a.util.createBuffer();d(x,"ssh-rsa");d(x,
729 +h);d(x,k);x.putInt32(v.length());x.putBuffer(v);x.putInt32(w.length());x.putBuffer(w);k=a.hmac.create();k.start("sha1",l);k.update(x.bytes());return n+="\r\nPrivate-MAC: "+k.digest().toHex()+"\r\n"};l.publicKeyToOpenSSH=function(b,e){e=e||"";var l=a.util.createBuffer();d(l,"ssh-rsa");c(l,b.e);c(l,b.n);return"ssh-rsa "+a.util.encode64(l.bytes())+" "+e};l.privateKeyToOpenSSH=function(b,c){return c?a.pki.encryptRsaPrivateKey(b,c,{legacy:!0,algorithm:"aes128"}):a.pki.privateKeyToPem(b)};l.getPublicKeyFingerprint=
730 +function(b,e){e=e||{};var l=e.md||a.md.md5.create(),h=a.util.createBuffer();d(h,"ssh-rsa");c(h,b.e);c(h,b.n);l.start();l.update(h.getBytes());l=l.digest();if("hex"===e.encoding)return l=l.toHex(),e.delimiter?l.match(/.{2}/g).join(e.delimiter):l;if("binary"===e.encoding)return l.getBytes();if(e.encoding)throw Error('Unknown encoding "'+e.encoding+'".');return l}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&
731 (forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.ssh)return c.ssh;c.defined.ssh=!0;for(var l=0;l<e.length;++l)e[l](c);return c.ssh}},l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/ssh","require module ./aes ./hmac ./md5 ./sha1 ./util".split(" "),
732 function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){function b(a){var c={},d=0;a.debug.set("forge.task","tasks",c);var e={};a.debug.set("forge.task","queues",e);var l={ready:{}};l.ready.stop="ready";l.ready.start="running";l.ready.cancel="done";l.ready.fail="error";l.running={};l.running.stop="ready";l.running.start="running";l.running.block="blocked";l.running.unblock="running";l.running.sleep="sleeping";l.running.wakeup="running";l.running.cancel="done";l.running.fail=
733 "error";l.blocked={};l.blocked.stop="blocked";l.blocked.start="blocked";l.blocked.block="blocked";l.blocked.unblock="blocked";l.blocked.sleep="blocked";l.blocked.wakeup="blocked";l.blocked.cancel="done";l.blocked.fail="error";l.sleeping={};l.sleeping.stop="sleeping";l.sleeping.start="sleeping";l.sleeping.block="sleeping";l.sleeping.unblock="sleeping";l.sleeping.sleep="sleeping";l.sleeping.wakeup="sleeping";l.sleeping.cancel="done";l.sleeping.fail="error";l.done={};l.done.stop="done";l.done.start=
734 "done";l.done.block="done";l.done.unblock="done";l.done.sleep="done";l.done.wakeup="done";l.done.cancel="done";l.done.fail="error";l.error={};l.error.stop="error";l.error.start="error";l.error.block="error";l.error.unblock="error";l.error.sleep="error";l.error.wakeup="error";l.error.cancel="error";l.error.fail="error";var n=function(a){this.id=-1;this.name=a.name||"?";this.parent=a.parent||null;this.run=a.run;this.subtasks=[];this.error=!1;this.state="ready";this.blocks=0;this.userData=this.swapTime=
735 this.timeoutId=null;this.id=d++;c[this.id]=this};n.prototype.debug=function(b){a.log.debug("forge.task",b||"","[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",e)};n.prototype.next=function(a,b){"function"===typeof a&&(b=a,a=this.name);var c=new n({run:b,name:a,parent:this});c.state="running";c.type=this.type;c.successCallback=this.successCallback||null;c.failureCallback=this.failureCallback||null;this.subtasks.push(c);return this};n.prototype.parallel=function(b,c){a.util.isArray(b)&&
735 -(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},l=0;l<c.length;l++)e(b+"__parallel-"+d.id+"-"+l,l)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
736 +(c=b,b=this.name);return this.next(b,function(d){d.block(c.length);for(var e=function(b,e){a.task.start({type:b,run:function(a){c[e](a)},success:function(a){d.unblock()},failure:function(a){d.unblock()}})},g=0;g<c.length;g++)e(b+"__parallel-"+d.id+"-"+g,g)})};n.prototype.stop=function(){this.state=l[this.state].stop};n.prototype.start=function(){this.error=!1;this.state=l[this.state].start;"running"===this.state&&(this.start=new Date,this.run(this),k(this,0))};n.prototype.block=function(a){this.blocks+=
737 "undefined"===typeof a?1:a;0<this.blocks&&(this.state=l[this.state].block)};n.prototype.unblock=function(a){this.blocks-="undefined"===typeof a?1:a;0===this.blocks&&"done"!==this.state&&(this.state="running",k(this,0));return this.blocks};n.prototype.sleep=function(a){this.state=l[this.state].sleep;var b=this;this.timeoutId=setTimeout(function(){b.timeoutId=null;b.state="running";k(b,0)},"undefined"===typeof a?0:a)};n.prototype.wait=function(a){a.wait(this)};n.prototype.wakeup=function(){"sleeping"===
737 -this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;g(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
738 -a.userData=this.userData,a=a.parent;g(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else g(a),a.error||
739 -null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},g=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
738 +this.state&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state="running",k(this,0))};n.prototype.cancel=function(){this.state=l[this.state].cancel;this.permitsNeeded=0;null!==this.timeoutId&&(cancelTimeout(this.timeoutId),this.timeoutId=null);this.subtasks=[]};n.prototype.fail=function(a){this.error=!0;h(this,!0);if(a)a.error=this.error,a.swapTime=this.swapTime,a.userData=this.userData,k(a,0);else{if(null!==this.parent){for(a=this.parent;null!==a.parent;)a.error=this.error,a.swapTime=this.swapTime,
739 +a.userData=this.userData,a=a.parent;h(a,!0)}this.failureCallback&&this.failureCallback(this)}};var m=function(a){a.error=!1;a.state=l[a.state].start;setTimeout(function(){"running"===a.state&&(a.swapTime=+new Date,a.run(a),k(a,0))},0)},k=function(a,b){var c=30<b||20<+new Date-a.swapTime,d=function(b){b++;if("running"===a.state)if(c&&(a.swapTime=+new Date),0<a.subtasks.length){var d=a.subtasks.shift();d.error=a.error;d.swapTime=a.swapTime;d.userData=a.userData;d.run(d);d.error||k(d,b)}else h(a),a.error||
740 +null===a.parent||(a.parent.error=a.error,a.parent.swapTime=a.swapTime,a.parent.userData=a.userData,k(a.parent,b))};c?setTimeout(d,0):d(b)},h=function(b,d){b.state="done";delete c[b.id];null===b.parent&&(b.type in e?0===e[b.type].length?a.log.error("forge.task","[%s][%s] task queue empty [%s]",b.id,b.name,b.type):e[b.type][0]!==b?a.log.error("forge.task","[%s][%s] task not first in queue [%s]",b.id,b.name,b.type):(e[b.type].shift(),0===e[b.type].length?delete e[b.type]:e[b.type][0].start()):a.log.error("forge.task",
741 "[%s][%s] task queue missing [%s]",b.id,b.name,b.type),d||(b.error&&b.failureCallback?b.failureCallback(b):!b.error&&b.successCallback&&b.successCallback(b)))};a.task=a.task||{};a.task.start=function(a){var b=new n({run:a.run,name:a.name||"?"});b.type=a.type;b.successCallback=a.success||null;b.failureCallback=a.failure||null;b.type in e?e[a.type].push(b):(e[b.type]=[b],m(b))};a.task.cancel=function(a){a in e&&(e[a]=[e[a][0]])};a.task.createCondition=function(){var a={tasks:{},wait:function(b){b.id in
742 a.tasks||(b.block(),a.tasks[b.id]=b)},notify:function(){var b=a.tasks;a.tasks={};for(var c in b)b[c].unblock()}};return a}}if("function"!==typeof a)if("object"===typeof module&&module.exports){var e=!0;a=function(a,b){b(c,module)}}else return"undefined"===typeof forge&&(forge={}),b(forge);var v,n=function(a,c){c.exports=function(c){var e=v.map(function(b){return a(b)}).concat(b);c=c||{};c.defined=c.defined||{};if(c.defined.task)return c.task;c.defined.task=!0;for(var l=0;l<e.length;++l)e[l](c);return c.task}},
743 l=a;a=function(b,c){v="string"===typeof b?c.slice(2):b.slice(2);if(e)return delete a,l.apply(null,Array.prototype.slice.call(arguments,0));a=l;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/task",["require","module","./debug","./log","./util"],function(){n.apply(null,Array.prototype.slice.call(arguments,0))})})();(function(){if("function"!==typeof a)if("object"===typeof module&&module.exports){var b=!0;a=function(a,b){b(c,module)}}else{"undefined"===typeof forge&&(forge={disableNativeCode:!1});
743 -return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,p){e="string"===typeof c?p.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
744 +return}var e,v=function(a,b){b.exports=function(b){var c=e.map(function(b){return a(b)});b=b||{};b.defined=b.defined||{};if(b.defined.forge)return b.forge;b.defined.forge=!0;for(var d=0;d<c.length;++d)c[d](b);return b};b.exports.disableNativeCode=!0;b.exports(b.exports)},n=a;a=function(c,q){e="string"===typeof c?q.slice(2):c.slice(2);if(b)return delete a,n.apply(null,Array.prototype.slice.call(arguments,0));a=n;return a.apply(null,Array.prototype.slice.call(arguments,0))};a("js/forge","require module ./aes ./aesCipherSuites ./asn1 ./cipher ./cipherModes ./debug ./des ./hmac ./kem ./log ./md ./mgf1 ./pbkdf2 ./pem ./pkcs7 ./pkcs1 ./pkcs12 ./pki ./prime ./prng ./pss ./random ./rc2 ./ssh ./task ./tls ./util".split(" "),
745 function(){v.apply(null,Array.prototype.slice.call(arguments,0))})})();return c("js/forge")});function amtcert_linkCertPrivateKey(b,c){for(var a in b){var d=b[a];try{if(0==c.length)break;for(var e=forge.pki.publicKeyToPem(forge.pki.certificateFromAsn1(forge.asn1.fromDer(d.X509Certificate)).publicKey).substring(60).replace(/(\r\n|\n|\r)/gm,""),v=0;v<c.length;v++)e===c[v].DERKey+"-----END PUBLIC KEY-----"&&(c[v].XCert=d,d.XPrivateKey=c[v])}catch(n){console.log(n)}}}
745 -function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,p=window.forge.pki.privateKeyToAsn1(l),q=window.forge.pki.wrapRsaPrivateKey(p);window.forge.asn1.toDer(q).getBytes();
746 -var h=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,h,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
746 +function amtcert_loadP12File(b,c,a){try{var d=window.forge.util.decode64(btoa(b)),e=window.forge.asn1.fromDer(d),v=window.forge.pkcs12.pkcs12FromAsn1(e,c),n=v.getBags({bagType:window.forge.pki.oids.pkcs8ShroudedKeyBag});console.assert(n[window.forge.pki.oids.pkcs8ShroudedKeyBag]&&0<n[window.forge.pki.oids.pkcs8ShroudedKeyBag].length);var l=n[window.forge.pki.oids.pkcs8ShroudedKeyBag][0].key,q=window.forge.pki.privateKeyToAsn1(l),p=window.forge.pki.wrapRsaPrivateKey(q);window.forge.asn1.toDer(p).getBytes();
747 +var g=v.getBags({bagType:window.forge.pki.oids.certBag})[window.forge.pki.oids.certBag][0].cert.subject.attributes,B=v.getBags({bagType:forge.pki.oids.certBag})[forge.pki.oids.certBag][0].cert;a(l,g,B);return!0}catch(w){}return!1}function amtcert_signWithCaKey(b,c,a,d,e){c&&null!=c||(c=amtcert_createCertificate(d).key);return amtcert_createCertificate(a,c,b,d,e)}
748 function amtcert_createCertificate(b,c,a,d,e){var v,n=forge.pki.createCertificate();a?n.publicKey=forge.pki.publicKeyFromPem("-----BEGIN PUBLIC KEY-----"+a+"-----END PUBLIC KEY-----"):(v=forge.pki.rsa.generateKeyPair(2048),n.publicKey=v.publicKey);n.serialNumber=""+Math.floor(1E5*Math.random()+1);n.validity.notBefore=new Date(2018,0,1);n.validity.notAfter=new Date(2049,11,31);var l=[];b.CN&&l.push({name:"commonName",value:b.CN});b.C&&l.push({name:"countryName",value:b.C});b.ST&&l.push({shortName:"ST",
749 value:b.ST});b.O&&l.push({name:"organizationName",value:b.O});n.setSubject(l);c?(b=[],d.CN&&b.push({name:"commonName",value:d.CN}),d.C&&b.push({name:"countryName",value:d.C}),d.ST&&b.push({shortName:"ST",value:d.ST}),d.O&&b.push({name:"organizationName",value:d.O}),n.setIssuer(b)):n.setIssuer(l);null==c?n.setExtensions([{name:"basicConstraints",cA:!0},{name:"nsCertType",sslCA:!0,emailCA:!0,objCA:!0},{name:"subjectKeyIdentifier"}]):(null==e?e={name:"extKeyUsage",serverAuth:!0}:e.name="extKeyUsage",
750 n.setExtensions([{name:"basicConstraints"},{name:"keyUsage",keyCertSign:!0,digitalSignature:!0,nonRepudiation:!0,keyEncipherment:!0,dataEncipherment:!0},e,{name:"nsCertType",client:!0,server:!0,email:!0,objsign:!0},{name:"subjectKeyIdentifier"}]));c?n.sign(c,forge.md.sha256.create()):n.sign(v.privateKey,forge.md.sha256.create());return a?n:{cert:n,key:v.privateKey}}
@@ -751,119 +752,121 @@ function _stringToArrayBuffer(b){for(var c=new ArrayBuffer(b.length),a=new Uint8
752 function getExtensionUrls(b,c){var a=[],d=b.getExtension(c);null!=d&&certCetAsn1Values(forge.asn1.fromDer(d.value),a);return a}var certUrlCache=null,certUrlCacheFile=null;
753 function getCertUrl(b,c){null==certUrlCacheFile&&(certUrlCacheFile=null!=process.env.LOCALAPPDATA?require("path").join(process.env.LOCALAPPDATA,"mccache.json"):"mccache.json");if(null==certUrlCache)try{certUrlCache=JSON.parse(require("fs").readFileSync(certUrlCacheFile))}catch(d){certUrlCache={}}if(null!=certUrlCache[b]&&null!=certUrlCache[b].data){var a=0;b.endsWith(".crl")&&(a=Date.now()-12096E5);if(certUrlCache[b].time>a){c(b,atob(certUrlCache[b].data));return}}console.log("Loading: "+b);a=require("url").parse(b);
754 require("https").get({hostname:a.hostname,port:a.port?a.port:443,path:a.path,method:"GET",rejectUnauthorized:!1},function(a){var e="";a.on("data",function(a){null!=e&&(e+=a.toString("binary"));5E5<e.length&&(e=null)});a.on("end",function(){certUrlCache[b]={data:btoa(e),time:Date.now()};try{require("fs").writeFileSync(certUrlCacheFile,JSON.stringify(certUrlCache,null,2))}catch(a){}c(b,e)})}).on("error",function(a){console.log("Error: "+a.message);c(b,null)})}
754 -var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,h,k,m,q){var u=a[b++];q={};var r=0,D=0;if(0==u){if(2==g.bpp)for(h=0;h<m;h++)n(a[b++]+(a[b++]<<8),h);else for(h=0;h<m;h++)v(a[b++],h);e(g.spare,c,d)}else if(1==u)g.graymode?(u=a[b++],g.lowcolor&&(u<<=4),g.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==g.bpp?a[b++]<<8:0),g.canvas.fillStyle="rgb("+(1==g.bpp?(u&224)+","+((u&28)<<3)+","+E((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
755 -((u&31)<<3))+")"),a=B(c,d),d=w(c,d),g.canvas.fillRect(a,d,h,k);else if(1<u&&17>u){k=4;D=15;if(2==g.bpp){for(h=0;h<u;h++)q[h]=a[b++]+(a[b++]<<8);2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)n(q[u>>h&D],r++)}else{for(h=0;h<u;h++)q[h]=a[b++];2==u?D=k=1:4>=u&&(k=2,D=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],h=8-k;0<=h;h-=k)v(q[u>>h&D],r++)}e(g.spare,c,d)}else if(128==u){if(2==g.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);D=1;do D+=h=a[b++];while(255==h);if(0==
756 -g.rotation)p(u,r,D),r+=D;else for(;0<=--D;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];D=1;do D+=h=a[b++];while(255==h);if(0==g.rotation)l(u,r,D),r+=D;else for(;0<=--D;)v(u,r++)}e(g.spare,c,d)}else if(129<u){if(2==g.bpp)for(h=0;h<u-128;h++)q[h]=a[b++]+(a[b++]<<8);else for(h=0;h<u-128;h++)q[h]=a[b++];for(;r<m&&b<a.byteLength;){D=1;h=a[b++];u=q[h%128];if(127<h){do D+=h=a[b++];while(255==h)}if(0==g.rotation)2==g.bpp?p(u,r,D):l(u,r,D),r+=D;else if(2==g.bpp)for(;0<=--D;)n(u,r++);else for(;0<=--D;)v(u,
757 -r++)}e(g.spare,c,d)}}function e(a,b,c){if(1!=g.holding){var d=0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-g.sparew2-c:2==g.rotation?g.canvas.canvas.width-g.sparew2-b:3==g.rotation?c:0;c=0==g.rotation?c:1==g.rotation?b:2==g.rotation?g.canvas.canvas.height-g.spareh2-c:3==g.rotation?g.canvas.canvas.height-g.spareh-b:0;g.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==
758 -g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.graymode?(g.lowcolor&&(a<<=4),g.spare.data[c]=g.spare.data[c+1]=g.spare.data[c+2]=a):(g.spare.data[c]=a&224,g.spare.data[c+1]=(a&28)<<3,g.spare.data[c+2]=E((a&3)<<6))}function n(a,b){var c=b<<2;if(0<g.rotation)if(1==g.rotation){var c=b%g.sparew,d=Math.floor(b/g.sparew);b=c*g.sparew2+(g.sparew2-1-d);c=b<<2}else 2==g.rotation?c=g.sparew*g.spareh*4-4-c:3==g.rotation&&(c=
759 -b%g.sparew,d=Math.floor(b/g.sparew),b=(g.sparew2-1-c)*g.sparew2+d,c=b<<2);g.spare.data[c]=a>>8&248;g.spare.data[c+1]=a>>3&252;g.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(g.graymode)for(b<<=2,g.lowcolor&&(a<<=4);0<=--c;)g.spare.data[b]=g.spare.data[b+1]=g.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=E((a&3)<<6);0<=--c;)g.spare.data[b]=d,g.spare.data[b+1]=e,g.spare.data[b+2]=a,b+=4}}function p(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)g.spare.data[b]=d,g.spare.data[b+
760 -1]=e,g.spare.data[b+2]=a,b+=4}function q(a,b){return 0==g.rotation?a:1==g.rotation?b:2==g.rotation?g.canvas.canvas.width-a:3==g.rotation?g.canvas.canvas.height-b:0}function h(a,b){return 0==g.rotation?b:1==g.rotation?g.canvas.canvas.width-a:2==g.rotation?g.canvas.canvas.height-b:3==g.rotation?a:0}function B(a,b){return 0==g.rotation||1==g.rotation?a:2==g.rotation?a-g.canvas.canvas.width:3==g.rotation?a-g.canvas.canvas.height:0}function w(a,b){return 0==g.rotation?b:1==g.rotation?b-g.canvas.canvas.width:
761 -2==g.rotation?b-g.canvas.canvas.height:3==g.rotation?b:0}function E(a){return 127<a?a+32:a}function m(){1!=g.holding&&g.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(g.rwidth)+ShortToStr(g.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==g.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
762 -null!=c&&g.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
763 -c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);g.sendkey(d,a)}return g.haltEvent(b)}var g={};g.canvasid=b;g.CanvasId=Q(b);g.scrolldiv=c;g.canvas=Q(b).getContext("2d");g.protocol=2;g.state=0;g.acc=null;g.ScreenWidth=960;g.ScreenHeight=700;g.width=0;g.height=0;g.rwidth=0;g.rheight=0;g.bpp=2;g.useRLE=!0;g.showmouse=!0;g.buttonmask=0;g.localKeyMap=!0;g.spare=null;g.sparew=0;g.spareh=0;g.sparew2=
764 -0;g.spareh2=0;g.sparecache={};g.onScreenSizeChange=null;g.frameRateDelay=0;g.noMouseRotate=!1;g.rotation=0;g.kvmDataSupported=!1;g.onKvmData=null;g.onKvmDataPending=[];g.onKvmDataAck=-1;g.holding=!1;g.lastKeepAlive=Date.now();g.kvmExt={};g.kvmExtChanged=null;g.useZLib=!1;g.decimation=!1;g.graymode=!1;g.lowcolor=!1;g.mNagleTimer=null;g.mx=0;g.my=0;g.inflate=ZLIB.inflateInit(-15);g.xxStateChange=function(a){0==a?(g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),g.canvas.canvas.width=
765 -g.rwidth=g.width=640,g.canvas.canvas.height=g.rheight=g.height=400,QS(g.canvasid).cursor="default"):QS(g.canvasid).cursor=g.showmouse?"default":"none"};g.ProcessBinaryData=function(b){if(null==g.acc)g.acc=new Uint8Array(b);else{var c=new Uint8Array(g.acc.byteLength+b.byteLength);c.set(g.acc,0);c.set(new Uint8Array(b),g.acc.byteLength);g.acc=c}for(;null!=g.acc&&0<g.acc.byteLength;){var l=0,h=new DataView(g.acc.buffer);if(0==g.state&&12<=g.acc.byteLength)l=12,g.state=1,g.send("RFB 003.008\n");else if(1==
766 -g.state&&1<=g.acc.byteLength)l=g.acc[0]+1,g.send(String.fromCharCode(1)),g.state=2;else if(2==g.state&&4<=g.acc.byteLength){l=4;if(0!=h.getUint32(0))return g.Stop();g.send(String.fromCharCode(1));g.state=3;g.parent&&(g.parent.disconnectCode=5E4)}else if(3==g.state&&24<=g.acc.byteLength){g.rotation=0;b=h.getUint32(20);if(g.acc.byteLength<24+b)break;l=24+b;g.canvas.canvas.width=g.rwidth=g.width=g.ScreenWidth=h.getUint16(0);g.canvas.canvas.height=g.rheight=g.height=g.ScreenHeight=h.getUint16(2);b="";
767 -g.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);g.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==g.graymode?1==g.bpp&&g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==g.bpp&&(g.bpp=1),0==g.lowcolor?g.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):g.send(String.fromCharCode(0,0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+
768 -ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));g.state=4;g.parent&&(g.parent.disconnectCode=0,g.parent.xxStateChange(3));null!=g.kvmExtChanged&&(g.sendKvmExtCmd(2,!0===g.decimation?3:2),g.sendKvmExtCmd(4,!0===g.useZLib?1:0));m();if(null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.parent&&(g.parent.disconnectCode=50001)}else if(4==g.state)switch(g.acc[0]){case 0:if(4>g.acc.byteLength)return;g.state=100+h.getUint16(2);l=4;break;case 2:l=1;break;case 3:if(8>g.acc.byteLength)return;
769 -b=h.getUint32(4)+8;if(g.acc.byteLength<b)return;c=g.acc;if(8>c.byteLength)l=0;else if(b=h.getUint32(4)+8,c.byteLength<b)l=0;else{if(null!=g.onKvmData){var k=a(new Uint8Array(c.buffer.slice(8,b)));if(16<=k.length&&"\x00KvmDataChannel"==k.substring(0,15)){0==g.kvmDataSupported&&(g.kvmDataSupported=!0);if(-1==g.onKvmDataAck&&16==k.length||0!=k.charCodeAt(15))g.onKvmDataAck=!0;urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(k.length-16)+"): "+k.substring(16));if(16<=k.length)g.onKvmData(k.substring(16));
770 -1==g.onKvmDataAck&&0<g.onKvmDataPending.length&&g.sendKvmData(g.onKvmDataPending.shift())}else 13<=k.length&&"\x00KvmExtCmd\x00"==k.substring(0,11)?(c=k.charCodeAt(11),k=k.charCodeAt(12),1==c&&(g.kvmExt.decimation=k,null!=g.kvmExtChanged&&g.kvmExtChanged(1,k)),2==c&&g.sendKvmExtCmd(1),3==c&&(g.kvmExt.compression=k,null!=g.kvmExtChanged&&g.kvmExtChanged(3,k)),4==c&&g.sendKvmExtCmd(3)):(console.log("Got KVM clipboard data:",k),urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+k.length+
771 -"): "+rstr2hex(k)+", "+k))}l=b}}else if(100<g.state&&12<=g.acc.byteLength){b=h.getUint16(0);var c=h.getUint16(2),l=h.getUint16(4),p=h.getUint16(6),k=l*p,q=h.getUint32(8);if(17>q){if(1>l||64<l||1>p||64<p)return console.log("Invalid tile size ("+l+","+p+"), disconnecting."),g.Stop();if(g.sparew!=l||g.spareh!=p){g.sparew=g.sparew2=l;g.spareh=g.spareh2=p;if(1==g.rotation||3==g.rotation)g.sparew2=p,g.spareh2=l;var u=g.sparew2+"x"+g.spareh2;g.spare=g.sparecache[u];if(!g.spare){g.sparecache[u]=g.spare=g.canvas.createImageData(g.sparew2,
772 -g.spareh2);for(var w=g.sparew2*g.spareh2<<2,u=3;u<w;u+=4)g.spare.data[u]=255}}}if(4294967073==q){if(g.canvas.canvas.width=g.rwidth=g.width=l,g.canvas.canvas.height=g.rheight=g.height=p,g.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(g.width)+ShortToStr(g.height)),l=12,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight)}else if(0==q){q=12;l=12+k*g.bpp;if(g.acc.byteLength<l)break;if(2==g.bpp)for(u=0;u<k;u++)n(h.getUint16(q,!0),u),q+=2;else for(u=0;u<k;u++)v(g.acc[q++],
773 -u);e(g.spare,b,c)}else if(16==q){if(16>g.acc.byteLength)break;u=h.getUint32(12);if(g.acc.byteLength<16+u)break;q=16;if(5<u&&0==g.acc[q]&&h.getUint16(q+1,!0)==u-5)d(g.acc,q+5,b,c,l,p,k,u);else if(h=g.inflate.inflate(a(new Uint8Array(g.acc.buffer.slice(q,q+u-0)))),0<h.length){for(var q=h,w=new Uint8Array(q.length),r=0,B=q.length;r<B;++r)w[r]=q.charCodeAt(r);d(w,0,b,c,l,p,k,h.length)}else console.log("Invalid deflate data");l=16+u}else return g.Stop();100==--g.state&&(g.state=4,0==g.frameRateDelay?m():
774 -setTimeout(m,g.frameRateDelay))}if(0==l)break;g.acc=l!=g.acc.byteLength?new Uint8Array(g.acc.buffer.slice(l)):null}};g.hold=function(a){if(g.holding!=a)if(g.holding=a,g.canvas.fillStyle="#000000",g.canvas.fillRect(0,0,g.width,g.height),0==g.holding){if(g.canvas.canvas.width!=g.width||g.canvas.canvas.height!=g.height)if(g.canvas.canvas.width=g.width,g.canvas.canvas.height=g.height,null!=g.onScreenSizeChange)g.onScreenSizeChange(g,g.ScreenWidth,g.ScreenHeight);g.send(String.fromCharCode(3,0,0,0,0,0)+
775 -ShortToStr(g.width)+ShortToStr(g.height))}else g.UnGrabMouseInput(),g.UnGrabKeyInput()};g.tcanvas=null;g.setRotation=function(a){for(;0>a;)a+=4;a%=4;if(1==g.holding)g.rotation=a;else{if(a==g.rotation)return!0;var b=g.canvas.canvas.width,c=g.canvas.canvas.height;if(1==g.rotation||3==g.rotation)b=g.canvas.canvas.height,c=g.canvas.canvas.width;null==g.tcanvas&&(g.tcanvas=document.createElement("canvas"));var d=g.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;
776 -d.rotate(-90*g.rotation*Math.PI/180);0==g.rotation&&d.drawImage(g.canvas.canvas,0,0);1==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,0);2==g.rotation&&d.drawImage(g.canvas.canvas,-g.canvas.canvas.width,-g.canvas.canvas.height);3==g.rotation&&d.drawImage(g.canvas.canvas,0,-g.canvas.canvas.height);if(0==g.rotation||2==g.rotation)g.canvas.canvas.height=b,g.canvas.canvas.width=c;if(1==g.rotation||3==g.rotation)g.canvas.canvas.height=c,g.canvas.canvas.width=b;g.canvas.setTransform(1,
777 -0,0,1,0,0);g.canvas.rotate(90*a*Math.PI/180);g.rotation=a;g.canvas.drawImage(g.tcanvas,B(0,0),w(0,0));g.width=g.canvas.canvas.width;g.height=g.canvas.canvas.height;if(null!=g.onScreenResize)g.onScreenResize(g,g.width,g.height,g.CanvasId);return!0}};g.Start=function(){g.state=0;g.acc=null;g.inflate.inflateReset();g.onKvmDataPending=[];g.onKvmDataAck=-1;g.kvmDataSupported=!1;g.kvmExt={};for(var a in g.sparecache)delete g.sparecache[a]};g.Stop=function(){g.UnGrabMouseInput();g.UnGrabKeyInput();g.parent&&
778 -g.parent.Stop()};g.send=function(a){g.parent&&g.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,
779 -ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};g.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);g.send(c)}else g.send(String.fromCharCode(4,b,0,
780 -0)+IntToStr(a))};g.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");g.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};g.sendKvmData=function(a){!0!==g.onKvmDataAck?g.onKvmDataPending.push(a):(urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a),a="\x00KvmDataChannel\x00"+a,g.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a),g.onKvmDataAck=!1)};g.sendKeepAlive=function(){g.lastKeepAlive<Date.now()-
781 -5E3&&(g.lastKeepAlive=Date.now(),g.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};g.SendCtrlAltDelMsg=function(){g.sendcad()};g.sendcad=function(){g.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,D=!1;g.GrabMouseInput=function(){if(1!=O){var a=g.canvas.canvas;a.onmouseup=g.mouseup;a.onmousedown=g.mousedown;a.onmousemove=g.mousemove;O=!0}};g.UnGrabMouseInput=function(){if(0!=O){var a=g.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=
782 -null;O=!1}};g.GrabKeyInput=function(){1!=D&&(document.onkeyup=g.handleKeyUp,document.onkeydown=g.handleKeyDown,document.onkeypress=g.handleKeys,D=!0)};g.UnGrabKeyInput=function(){0!=D&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,D=!1)};g.handleKeys=function(a){return g.haltEvent(a)};g.handleKeyUp=function(a){return k(0,a)};g.handleKeyDown=function(a){return k(1,a)};g.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
783 -g.mousedblclick=function(a){};g.mousedown=function(a){g.buttonmask|=1<<a.button;return g.mousemove(a,1)};g.mouseup=function(a){g.buttonmask&=65535-(1<<a.button);return g.mousemove(a,1)};g.mousemove=function(a,b){if(4>g.state)return!0;var c=g.canvas.canvas.height/Q(g.canvasid).offsetHeight,d=g.canvas.canvas.width/Q(g.canvasid).offsetWidth,e=g.getPositionOfControl(Q(g.canvasid));g.mx=(event.pageX-e[0])*d;g.my=(event.pageY-e[1])*c;event.addx&&(g.mx+=event.addx);event.addy&&(g.my+=event.addy);if(1==g.rotation||
784 -3==g.rotation)g.mx=g.mx*g.rwidth/g.width,g.my=g.my*g.rheight/g.height;1!=g.noMouseRotate&&(c=q(g.mx,g.my),g.my=h(g.mx,g.my),g.mx=c);1==b?(g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my)),null!=g.mNagleTimer&&(clearTimeout(g.mNagleTimer),g.mNagleTimer=null)):null==g.mNagleTimer&&(g.mNagleTimer=setTimeout(function(){g.send(String.fromCharCode(5,g.buttonmask)+ShortToStr(g.mx)+ShortToStr(g.my));g.mNagleTimer=null},50));return g.haltEvent(a)};g.getPositionOfControl=function(a){var b=
785 -Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return g},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=
786 -0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=
787 -function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,
788 -0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,
789 -2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&
790 -(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,
791 -v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+
792 -b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+
793 -b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,q=0,h=0,n=ReadShort(b,0),w=ReadShort(b,2),E=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=b.substring(8);E=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,
794 -rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),q=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),h=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+q+" Y="+h);switch(n){case 3:if(a.FirstDraw)a.onResize();a.ProcessPictureMsg(c,q,h);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(q,
795 -h);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;q={};h=((b.charCodeAt(4)&255)<<8)+(b.charCodeAt(5)&255);if(0<h)for(c=((b.charCodeAt(6+2*h)&255)<<8)+(b.charCodeAt(7+2*h)&255),n=0;n<h;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);q[m]=65535==m?"All Displays":"Display "+
796 -m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,q,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,
797 -b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+E}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,
798 -Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,
799 -MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,
800 -17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,
801 -91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,
802 -a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);
803 -var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:
804 -n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var E="",E=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?
805 -(a.send(E),a.Alternate=1):a.Alternate=0:a.send(E)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=
806 -a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&
807 -a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,
808 -b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
809 -return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||
810 -3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};
811 -a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,
812 -n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=
813 -b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&
814 -null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=
815 -b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=
816 -b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=
817 -a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=
818 -a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,
819 -c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=
820 -function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,
821 -0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=
822 -a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};
823 -return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:
824 -e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,h=0;h<c;h++)b+=String.fromCharCode(a[h]);
825 -d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==
826 -typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&
827 -urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}E>l.width&&(E=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<
828 -E&&(E--,R&&d(" "));break;case "\t":b=8-E%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>C[1]&&(l.recordLineTobackBuffer(0),n(1),m=C[1]);l.lineFeed="\r";E=0;break;case "\r":E=0;break;default:E>=l.width&&(E=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),E++}}}function d(a){A[m][E]=a;z[m][E]=(h<<6)+(B<<12)+q}function e(){for(var a=(h<<6)+(B<<12)+q,b=E;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(h<<6)+(B<<12)+q,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=C[0];b<=
829 -C[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=C[1]-a+1;b<=C[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var p="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),q=0,h=7,B=0,w=!0,E=0,m=0,k=
830 -0,g=0,u=0,O=[],D=0,y=0,z=[],A=[],R=!1,x=!0,C,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));
831 -null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var p=String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];y=D=0;break;default:a(p)}break;case 1:switch(p){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=E;g=m;u=0;break;case "8":E=k;m=g;u=0;break;case "M":for(n=C[1];n>=C[0]+1;n--)for(var r=
832 -0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=C[0]+1-1;n>C[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;default:console.log("unknown terminal short code",p),u=0}break;case 2:if("0"<=p&&"9">=p){O[D]=O[D]?10*O[D]+(p-0):p-0;break}else if(";"==p){D++;break}else if("?"==p){y=1;break}else{O[0]||(O[0]=0);var n=O,r=D+1,R=y;if(1==R)switch(p){case "l":25==n[0]&&(x=!1);break;case "h":25==n[0]&&(x=!0)}else if(0==R){var I=void 0;switch(p){case "c":l.TermResetScreen();break;case "A":1==
833 -r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==n[0]?E++:E+=n[0],E>l.width&&(E=l.width));break;case "D":1==r&&(0==n[0]?E--:E-=n[0],0>E&&(E=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(E=n[0]-1,0>E&&(E=0),E>l.width-1&&(E=l.width-1));break;case "P":p=1;1==r&&(p=n[0]);for(I=E;I<l.width-p;I++)A[m][I]=A[m][I+p],z[m][I]=z[m][I+p];for(I=l.width-p;I<l.width;I++)A[m][I]=" ",z[m][I]=
834 -448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=C[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],z[n]=[],p=0;p<l.width;p++)A[n][p]=" ",z[n][p]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(h<<6)),m=E=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,E=n[1]-1):E=m=0;break;
835 -case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>h&&(h+=8):2==n[I]||22==n[I]?8<=h&&(h-=8):7==n[I]?q=2:27==n[I]?q=0:30<=n[I]&&37>=n[I]?(p=8<=h,h=n[I]-30,p&&8>=h&&(h+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?h=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,h=7,q=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(h<<6)+(B<<12)+q,r=0;r<E;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(C=[n[0]-1,n[1]-
836 -1]);0>C[0]&&(C[0]=0);C[0]>l.height-1&&(C[0]=l.height-1);0>C[1]&&(C[1]=0);C[1]>l.height-1&&(C[1]=l.height-1);C[0]>C[1]&&(C[0]=C[1]);break;case "S":p=1;1==r&&(p=n[0]);for(n=C[0];n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":p=1;1==r&&(p=n[0]);for(n=m;n<=C[1]-p;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+p][r],z[n][r]=z[n+p][r];for(n=C[1]-p+1;n<C[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=
837 -448;break;case "T":p=1;1==r&&(p=n[0]);for(n=C[1];n>C[0]+p;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-p][r],z[n][r]=z[n-p][r];for(n=C[0]+p;n>C[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":p=1;I=E;R=m;for(1==r&&(p=n[0]);0<p&&R<l.height;)A[R][I]=" ",I++,p--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",p,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=p.charCodeAt(0),";"==p)D++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&
838 -1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[D]=O[D]?O[D]+p:p}}l.TermDraw()};l.ProcessVt100String=function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,
839 -9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,
840 -9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){q=
841 -0;h=7;B=0;w=x=!0;E=m=0;R=!1;C=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),
842 -!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==
843 -a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==
844 -a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),
845 -!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,
846 -79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],E==h&&m==b&&x&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+p[d>>e&63]+";background-color:#"+p[d>>g&63],d&
847 -1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=
848 -function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):l.Init();return l},ZLIB=ZLIB||{};
755 +var CreateAmtRemoteDesktop=function(b,c){function a(a){return String.fromCharCode.apply(null,a)}function d(a,b,c,d,g,k,m,p){var u=a[b++];p={};var r=0,C=0;if(0==u){if(2==h.bpp)for(g=0;g<m;g++)n(a[b++]+(a[b++]<<8),g);else for(g=0;g<m;g++)v(a[b++],g);e(h.spare,c,d)}else if(1==u)h.graymode?(u=a[b++],h.lowcolor&&(u<<=4),h.canvas.fillStyle="rgb("+u+","+u+","+u+")"):(u=a[b++]+(2==h.bpp?a[b++]<<8:0),h.canvas.fillStyle="rgb("+(1==h.bpp?(u&224)+","+((u&28)<<3)+","+D((u&3)<<6):(u>>8&248)+","+(u>>3&252)+","+
756 +((u&31)<<3))+")"),a=B(c,d),d=w(c,d),h.canvas.fillRect(a,d,g,k);else if(1<u&&17>u){k=4;C=15;if(2==h.bpp){for(g=0;g<u;g++)p[g]=a[b++]+(a[b++]<<8);2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)n(p[u>>g&C],r++)}else{for(g=0;g<u;g++)p[g]=a[b++];2==u?C=k=1:4>=u&&(k=2,C=3);for(;r<m&&b<a.byteLength;)for(u=a[b++],g=8-k;0<=g;g-=k)v(p[u>>g&C],r++)}e(h.spare,c,d)}else if(128==u){if(2==h.bpp)for(;r<m&&b<a.byteLength;){u=a[b++]+(a[b++]<<8);C=1;do C+=g=a[b++];while(255==g);if(0==
757 +h.rotation)q(u,r,C),r+=C;else for(;0<=--C;)n(u,r++)}else for(;r<m&&b<a.byteLength;){u=a[b++];C=1;do C+=g=a[b++];while(255==g);if(0==h.rotation)l(u,r,C),r+=C;else for(;0<=--C;)v(u,r++)}e(h.spare,c,d)}else if(129<u){if(2==h.bpp)for(g=0;g<u-128;g++)p[g]=a[b++]+(a[b++]<<8);else for(g=0;g<u-128;g++)p[g]=a[b++];for(;r<m&&b<a.byteLength;){C=1;g=a[b++];u=p[g%128];if(127<g){do C+=g=a[b++];while(255==g)}if(0==h.rotation)2==h.bpp?q(u,r,C):l(u,r,C),r+=C;else if(2==h.bpp)for(;0<=--C;)n(u,r++);else for(;0<=--C;)v(u,
758 +r++)}e(h.spare,c,d)}}function e(a,b,c){if(1!=h.holding){var d=0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-h.sparew2-c:2==h.rotation?h.canvas.canvas.width-h.sparew2-b:3==h.rotation?c:0;c=0==h.rotation?c:1==h.rotation?b:2==h.rotation?h.canvas.canvas.height-h.spareh2-c:3==h.rotation?h.canvas.canvas.height-h.spareh-b:0;h.canvas.putImageData(a,d,c)}}function v(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==
759 +h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.graymode?(h.lowcolor&&(a<<=4),h.spare.data[c]=h.spare.data[c+1]=h.spare.data[c+2]=a):(h.spare.data[c]=a&224,h.spare.data[c+1]=(a&28)<<3,h.spare.data[c+2]=D((a&3)<<6))}function n(a,b){var c=b<<2;if(0<h.rotation)if(1==h.rotation){var c=b%h.sparew,d=Math.floor(b/h.sparew);b=c*h.sparew2+(h.sparew2-1-d);c=b<<2}else 2==h.rotation?c=h.sparew*h.spareh*4-4-c:3==h.rotation&&(c=
760 +b%h.sparew,d=Math.floor(b/h.sparew),b=(h.sparew2-1-c)*h.sparew2+d,c=b<<2);h.spare.data[c]=a>>8&248;h.spare.data[c+1]=a>>3&252;h.spare.data[c+2]=(a&31)<<3}function l(a,b,c){if(h.graymode)for(b<<=2,h.lowcolor&&(a<<=4);0<=--c;)h.spare.data[b]=h.spare.data[b+1]=h.spare.data[b+2]=a,b+=4;else{b<<=2;var d=a&224,e=(a&28)<<3;for(a=D((a&3)<<6);0<=--c;)h.spare.data[b]=d,h.spare.data[b+1]=e,h.spare.data[b+2]=a,b+=4}}function q(a,b,c){b<<=2;var d=a>>8&248,e=a>>3&252;for(a=(a&31)<<3;0<=--c;)h.spare.data[b]=d,h.spare.data[b+
761 +1]=e,h.spare.data[b+2]=a,b+=4}function p(a,b){return 0==h.rotation?a:1==h.rotation?b:2==h.rotation?h.canvas.canvas.width-a:3==h.rotation?h.canvas.canvas.height-b:0}function g(a,b){return 0==h.rotation?b:1==h.rotation?h.canvas.canvas.width-a:2==h.rotation?h.canvas.canvas.height-b:3==h.rotation?a:0}function B(a,b){return 0==h.rotation||1==h.rotation?a:2==h.rotation?a-h.canvas.canvas.width:3==h.rotation?a-h.canvas.canvas.height:0}function w(a,b){return 0==h.rotation?b:1==h.rotation?b-h.canvas.canvas.width:
762 +2==h.rotation?b-h.canvas.canvas.height:3==h.rotation?b:0}function D(a){return 127<a?a+32:a}function m(){1!=h.holding&&h.send(String.fromCharCode(3,1,0,0,0,0)+ShortToStr(h.rwidth)+ShortToStr(h.rheight))}function k(a,b){b||(b=window.event);if(b.code&&0==h.localKeyMap){var c;c=b;c=c.code.startsWith("Key")&&4==c.code.length?c.code.charCodeAt(3)+(0==c.shiftKey?32:0):c.code.startsWith("Digit")&&6==c.code.length?c.code.charCodeAt(5):c.code.startsWith("Numpad")&&7==c.code.length?c.code.charCodeAt(6):u[c.code];
763 +null!=c&&h.sendkey(c,a)}else{var d=c=b.keyCode;0==b.shiftKey&&65<=c&&90>=c&&(d=c+32);112<=c&&124>=c&&(d=c+65358);8==c&&(d=65288);9==c&&(d=65289);13==c&&(d=65293);16==c&&(d=65505);17==c&&(d=65507);18==c&&(d=65513);27==c&&(d=65307);33==c&&(d=65365);34==c&&(d=65366);35==c&&(d=65367);36==c&&(d=65360);37==c&&(d=65361);38==c&&(d=65362);39==c&&(d=65363);40==c&&(d=65364);45==c&&(d=65379);46==c&&(d=65535);96<=c&&105>=c&&(d=c-48);106==c&&(d=42);107==c&&(d=43);109==c&&(d=45);110==c&&(d=46);111==c&&(d=47);186==
764 +c&&(d=59);187==c&&(d=61);188==c&&(d=44);189==c&&(d=45);190==c&&(d=46);191==c&&(d=47);192==c&&(d=96);219==c&&(d=91);220==c&&(d=92);221==c&&(d=93);222==c&&(d=39);h.sendkey(d,a)}return h.haltEvent(b)}var h={};h.canvasid=b;h.CanvasId=Q(b);h.scrolldiv=c;h.canvas=Q(b).getContext("2d");h.protocol=2;h.state=0;h.acc=null;h.ScreenWidth=960;h.ScreenHeight=700;h.width=0;h.height=0;h.rwidth=0;h.rheight=0;h.bpp=2;h.useRLE=!0;h.showmouse=!0;h.buttonmask=0;h.localKeyMap=!0;h.spare=null;h.sparew=0;h.spareh=0;h.sparew2=
765 +0;h.spareh2=0;h.sparecache={};h.onScreenSizeChange=null;h.frameRateDelay=0;h.noMouseRotate=!1;h.rotation=0;h.kvmDataSupported=!1;h.onKvmData=null;h.onKvmDataPending=[];h.onKvmDataAck=-1;h.holding=!1;h.lastKeepAlive=Date.now();h.kvmExt={};h.kvmExtChanged=null;h.useZLib=!1;h.decimationMode=0;h.graymode=!1;h.lowcolor=!1;h.mNagleTimer=null;h.mx=0;h.my=0;h.inflate=ZLIB.inflateInit(-15);h.xxStateChange=function(a){0==a?(h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),h.canvas.canvas.width=
766 +h.rwidth=h.width=640,h.canvas.canvas.height=h.rheight=h.height=400,QS(h.canvasid).cursor="default"):QS(h.canvasid).cursor=h.showmouse?"default":"none"};h.ProcessBinaryData=function(b){if(null==h.acc)h.acc=new Uint8Array(b);else{var c=new Uint8Array(h.acc.byteLength+b.byteLength);c.set(h.acc,0);c.set(new Uint8Array(b),h.acc.byteLength);h.acc=c}for(;null!=h.acc&&0<h.acc.byteLength;){var g=0,l=new DataView(h.acc.buffer);if(0==h.state&&12<=h.acc.byteLength)g=12,h.state=1,h.parent&&delete h.parent.connectTime,
767 +h.send("RFB 003.008\n");else if(1==h.state&&1<=h.acc.byteLength)g=h.acc[0]+1,h.send(String.fromCharCode(1)),h.state=2;else if(2==h.state&&4<=h.acc.byteLength){g=4;if(0!=l.getUint32(0))return h.Stop();h.send(String.fromCharCode(1));h.state=3;h.parent&&(h.parent.disconnectCode=5E4)}else if(3==h.state&&24<=h.acc.byteLength){h.rotation=0;b=l.getUint32(20);if(h.acc.byteLength<24+b)break;g=24+b;h.canvas.canvas.width=h.rwidth=h.width=h.ScreenWidth=l.getUint16(0);h.canvas.canvas.height=h.rheight=h.height=
768 +h.ScreenHeight=l.getUint16(2);b="";h.useRLE&&(b+=IntToStr(16));b+=IntToStr(0);b+=IntToStr(1092);h.send(String.fromCharCode(2,0)+ShortToStr(b.length/4+1)+b+IntToStr(-223));0==h.graymode?1==h.bpp&&h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(7)+ShortToStr(7)+ShortToStr(3)+String.fromCharCode(5,2,0,0,0,0)):(2==h.bpp&&(h.bpp=1),0==h.lowcolor?h.send(String.fromCharCode(0,0,0,0,8,8,0,1)+ShortToStr(255)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)):h.send(String.fromCharCode(0,
769 +0,0,0,8,4,0,1)+ShortToStr(15)+ShortToStr(0)+ShortToStr(0)+String.fromCharCode(0,0,0,0,0,0)));h.state=4;h.parent&&(h.parent.connectTime=Date.now(),h.parent.disconnectCode=0,h.parent.xxStateChange(3));null!=h.kvmExtChanged&&(0<h.decimationMode&&h.sendKvmExtCmd(2,h.decimationMode),h.sendKvmExtCmd(4,!0===h.useZLib?1:0));m();if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&(h.parent.disconnectCode=50001,9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=
770 +50002))}else if(4==h.state)switch(h.acc[0]){case 0:if(4>h.acc.byteLength)return;h.state=100+l.getUint16(2);g=4;break;case 2:g=1;break;case 3:if(8>h.acc.byteLength)return;b=l.getUint32(4)+8;if(h.acc.byteLength<b)return;c=h.acc;if(8>c.byteLength)g=0;else if(b=l.getUint32(4)+8,c.byteLength<b)g=0;else{if(null!=h.onKvmData)if(c=a(new Uint8Array(c.buffer.slice(8,b))),16<=c.length&&"\x00KvmDataChannel"==c.substring(0,15)){0==h.kvmDataSupported&&(h.kvmDataSupported=!0);if(-1==h.onKvmDataAck&&16==c.length||
771 +0!=c.charCodeAt(15))h.onKvmDataAck=!0;try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Recv("+(c.length-16)+"): "+c.substring(16))}catch(k){}if(16<=c.length)h.onKvmData(c.substring(16));1==h.onKvmDataAck&&0<h.onKvmDataPending.length&&h.sendKvmData(h.onKvmDataPending.shift())}else if(13<=c.length&&"\x00KvmExtCmd\x00"==c.substring(0,11)){var p=c.charCodeAt(11),l=c.charCodeAt(12);1==p&&(h.kvmExt.decimationMode=l,13<c.length&&(h.kvmExt.decimationState=c.charCodeAt(13)),null!=h.kvmExtChanged&&
772 +h.kvmExtChanged(1,h.kvmExt,h.kvmExt));2==p&&h.sendKvmExtCmd(1);3==p&&(h.kvmExt.compression=l,null!=h.kvmExtChanged&&h.kvmExtChanged(3,h.kvmExt));4==p&&h.sendKvmExtCmd(3)}else{console.log("Got KVM clipboard data:",c);try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-ClipBoard-Recv("+c.length+"): "+rstr2hex(c)+", "+c)}catch(k){}}g=b}}else if(100<h.state&&12<=h.acc.byteLength){b=l.getUint16(0);var c=l.getUint16(2),g=l.getUint16(4),q=l.getUint16(6),p=g*q,u=l.getUint32(8);if(17>u){if(1>g||64<g||1>q||
773 +64<q)return console.log("Invalid tile size ("+g+","+q+"), disconnecting."),h.Stop();if(h.sparew!=g||h.spareh!=q){h.sparew=h.sparew2=g;h.spareh=h.spareh2=q;if(1==h.rotation||3==h.rotation)h.sparew2=q,h.spareh2=g;var w=h.sparew2+"x"+h.spareh2;h.spare=h.sparecache[w];if(!h.spare){h.sparecache[w]=h.spare=h.canvas.createImageData(h.sparew2,h.spareh2);for(var P=h.sparew2*h.spareh2<<2,w=3;w<P;w+=4)h.spare.data[w]=255}}}if(4294967073==u){h.canvas.canvas.width=h.rwidth=h.width=g;h.canvas.canvas.height=h.rheight=
774 +h.height=q;h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height));g=12;if(null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.parent&&9216E3<h.bpp*h.width*h.height&&(h.parent.disconnectCode=50002)}else if(0==u){u=12;g=12+p*h.bpp;if(h.acc.byteLength<g)break;if(2==h.bpp)for(w=0;w<p;w++)n(l.getUint16(u,!0),w),u+=2;else for(w=0;w<p;w++)v(h.acc[u++],w);e(h.spare,b,c)}else if(16==u){if(16>h.acc.byteLength)break;w=l.getUint32(12);if(h.acc.byteLength<
775 +16+w)break;u=16;if(5<w&&0==h.acc[u]&&l.getUint16(u+1,!0)==w-5)d(h.acc,u+5,b,c,g,q,p,w);else if(l=h.inflate.inflate(a(new Uint8Array(h.acc.buffer.slice(u,u+w-0)))),0<l.length){for(var u=l,P=new Uint8Array(u.length),r=0,B=u.length;r<B;++r)P[r]=u.charCodeAt(r);d(P,0,b,c,g,q,p,l.length)}else console.log("Invalid deflate data");g=16+w}else return h.Stop();100==--h.state&&(h.state=4,0==h.frameRateDelay?m():setTimeout(m,h.frameRateDelay))}if(0==g)break;h.acc=g!=h.acc.byteLength?new Uint8Array(h.acc.buffer.slice(g)):
776 +null}};h.hold=function(a){if(h.holding!=a)if(h.holding=a,h.canvas.fillStyle="#000000",h.canvas.fillRect(0,0,h.width,h.height),0==h.holding){if(h.canvas.canvas.width!=h.width||h.canvas.canvas.height!=h.height)if(h.canvas.canvas.width=h.width,h.canvas.canvas.height=h.height,null!=h.onScreenSizeChange)h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight);h.send(String.fromCharCode(3,0,0,0,0,0)+ShortToStr(h.width)+ShortToStr(h.height))}else h.UnGrabMouseInput(),h.UnGrabKeyInput()};h.tcanvas=null;h.setRotation=
777 +function(a){for(;0>a;)a+=4;a%=4;if(1==h.holding)h.rotation=a;else{if(a==h.rotation)return!0;var b=h.canvas.canvas.width,c=h.canvas.canvas.height;if(1==h.rotation||3==h.rotation)b=h.canvas.canvas.height,c=h.canvas.canvas.width;null==h.tcanvas&&(h.tcanvas=document.createElement("canvas"));var d=h.tcanvas.getContext("2d");d.setTransform(1,0,0,1,0,0);d.canvas.width=b;d.canvas.height=c;d.rotate(-90*h.rotation*Math.PI/180);0==h.rotation&&d.drawImage(h.canvas.canvas,0,0);1==h.rotation&&d.drawImage(h.canvas.canvas,
778 +-h.canvas.canvas.width,0);2==h.rotation&&d.drawImage(h.canvas.canvas,-h.canvas.canvas.width,-h.canvas.canvas.height);3==h.rotation&&d.drawImage(h.canvas.canvas,0,-h.canvas.canvas.height);if(0==h.rotation||2==h.rotation)h.canvas.canvas.height=b,h.canvas.canvas.width=c;if(1==h.rotation||3==h.rotation)h.canvas.canvas.height=c,h.canvas.canvas.width=b;h.canvas.setTransform(1,0,0,1,0,0);h.canvas.rotate(90*a*Math.PI/180);h.rotation=a;h.canvas.drawImage(h.tcanvas,B(0,0),w(0,0));h.width=h.canvas.canvas.width;
779 +h.height=h.canvas.canvas.height;if(null!=h.onScreenResize)h.onScreenResize(h,h.width,h.height,h.CanvasId);return!0}};h.Start=function(){h.state=0;h.acc=null;h.inflate.inflateReset();h.onKvmDataPending=[];h.onKvmDataAck=-1;h.kvmDataSupported=!1;h.kvmExt={};for(var a in h.sparecache)delete h.sparecache[a]};h.Stop=function(){h.UnGrabMouseInput();h.UnGrabKeyInput();h.parent&&h.parent.Stop()};h.send=function(a){h.parent&&h.parent.send(a)};var u={Pause:19,CapsLock:20,Space:32,Quote:39,Minus:45,NumpadMultiply:42,
780 +NumpadAdd:43,PrintScreen:44,Comma:44,NumpadSubtract:45,NumpadDecimal:46,Period:46,Slash:47,NumpadDivide:47,Semicolon:59,Equal:61,OSLeft:91,BracketLeft:91,OSRight:91,Backslash:92,BracketRight:93,ContextMenu:93,Backquote:96,NumLock:144,ScrollLock:145,Backspace:65288,Tab:65289,Enter:65293,NumpadEnter:65293,Escape:65307,Delete:65535,Home:65360,PageUp:65365,PageDown:65366,ArrowLeft:65361,ArrowUp:65362,ArrowRight:65363,ArrowDown:65364,End:65367,Insert:65379,F1:65470,F2:65471,F3:65472,F4:65473,F5:65474,
781 +F6:65475,F7:65476,F8:65477,F9:65478,F10:65479,F11:65480,F12:65481,ShiftLeft:65505,ShiftRight:65506,ControlLeft:65507,ControlRight:65508,AltLeft:65513,AltRight:65514,MetaLeft:65511,MetaRight:65512};h.sendkey=function(a,b){if("object"==typeof a){var c="",d;for(d in a)c+=String.fromCharCode(4,a[d][1],0,0)+IntToStr(a[d][0]);h.send(c)}else h.send(String.fromCharCode(4,b,0,0)+IntToStr(a))};h.sendKvmExtCmd=function(a,b){var c="\x00KvmExtCmd\x00"+String.fromCharCode(a)+(null!=b?String.fromCharCode(b):"");
782 +h.send(String.fromCharCode(6,0,0,0)+IntToStr(c.length)+c)};h.sendKvmData=function(a){if(!0!==h.onKvmDataAck)h.onKvmDataPending.push(a);else{try{urlvars&&urlvars.kvmdatatrace&&console.log("KVM-DataChannel-Send("+a.length+"): "+a)}catch(b){}a="\x00KvmDataChannel\x00"+a;h.send(String.fromCharCode(6,0,0,0)+IntToStr(a.length)+a);h.onKvmDataAck=!1}};h.sendKeepAlive=function(){h.lastKeepAlive<Date.now()-5E3&&(h.lastKeepAlive=Date.now(),h.send(String.fromCharCode(6,0,0,0)+IntToStr(16)+"\x00KvmDataChannel\x00"))};
783 +h.SendCtrlAltDelMsg=function(){h.sendcad()};h.sendcad=function(){h.sendkey([[65507,1],[65513,1],[65535,1],[65535,0],[65513,0],[65507,0]])};var O=!1,C=!1;h.GrabMouseInput=function(){if(1!=O){var a=h.canvas.canvas;a.onmouseup=h.mouseup;a.onmousedown=h.mousedown;a.onmousemove=h.mousemove;a.onmousewheel=h.mousewheel;O=!0}};h.UnGrabMouseInput=function(){if(0!=O){var a=h.canvas.canvas;a.onmousemove=null;a.onmouseup=null;a.onmousedown=null;a.onmousewheel=null;O=!1}};h.GrabKeyInput=function(){1!=C&&(document.onkeyup=
784 +h.handleKeyUp,document.onkeydown=h.handleKeyDown,document.onkeypress=h.handleKeys,C=!0)};h.UnGrabKeyInput=function(){0!=C&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,C=!1)};h.handleKeys=function(a){return h.haltEvent(a)};h.handleKeyUp=function(a){return k(0,a)};h.handleKeyDown=function(a){return k(1,a)};h.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};h.mousedblclick=function(a){};h.mousewheel=function(a){var b=
785 +0;"number"==typeof a.deltaY?b=-1*a.deltaY:"number"==typeof a.detail?b=-1*a.detail:"number"==typeof a.wheelDelta&&(b=a.wheelDelta);if(0!=b){var c=h.buttonmask;h.buttonmask|=1<<(0<b?3:4);h.mousemove(a,1);h.buttonmask=c;return h.mousemove(a,1)}};h.mousedown=function(a){h.buttonmask|=1<<a.button;return h.mousemove(a,1)};h.mouseup=function(a){h.buttonmask&=65535-(1<<a.button);return h.mousemove(a,1)};h.mousemove=function(a,b){if(4>h.state)return!0;var c=h.canvas.canvas.height/Q(h.canvasid).offsetHeight,
786 +d=h.canvas.canvas.width/Q(h.canvasid).offsetWidth,e=h.getPositionOfControl(Q(h.canvasid));h.mx=(event.pageX-e[0])*d;h.my=(event.pageY-e[1])*c;event.addx&&(h.mx+=event.addx);event.addy&&(h.my+=event.addy);if(1==h.rotation||3==h.rotation)h.mx=h.mx*h.rwidth/h.width,h.my=h.my*h.rheight/h.height;1!=h.noMouseRotate&&(c=p(h.mx,h.my),h.my=g(h.mx,h.my),h.mx=c);1==b?(h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my)),null!=h.mNagleTimer&&(clearTimeout(h.mNagleTimer),h.mNagleTimer=
787 +null)):null==h.mNagleTimer&&(h.mNagleTimer=setTimeout(function(){h.send(String.fromCharCode(5,h.buttonmask)+ShortToStr(h.mx)+ShortToStr(h.my));h.mNagleTimer=null},50));return h.haltEvent(a)};h.getPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};return h},CreateAgentRemoteDesktop=function(b,c){var a={};a.CanvasId=b;"string"===typeof b&&(a.CanvasId=Q(b));a.Canvas=a.CanvasId.getContext("2d");a.scrolldiv=c;a.State=0;a.PendingOperations=
788 +[];a.tilesReceived=0;a.TilesDrawn=0;a.KillDraw=0;a.ipad=!1;a.tabletKeyboardVisible=!1;a.LastX=0;a.LastY=0;a.touchenabled=0;a.submenuoffset=0;a.touchtimer=null;a.TouchArray={};a.connectmode=0;a.connectioncount=0;a.rotation=0;a.protocol=2;a.debugmode=0;a.firstUpKeys=[];a.stopInput=!1;a.localKeyMap=!0;a.altPressed=!1;a.ctrlPressed=!1;a.shiftPressed=!1;a.sessionid=0;a.username;a.oldie=!1;a.CompressionLevel=50;a.ScalingLevel=1024;a.FrameRateTimer=10;a.FirstDraw=!1;a.ScreenWidth=960;a.ScreenHeight=700;
789 +a.width=960;a.height=960;a.onScreenSizeChange=null;a.onMessage=null;a.onConnectCountChanged=null;a.onDebugMessage=null;a.onTouchEnabledChanged=null;a.onDisplayinfo=null;a.accumulator=null;var d=!0,e="default";a.mouseCursorActive=function(b){d!=b&&(d=b,a.CanvasId.style.cursor=1==b?e:"default")};var v="default progress crosshair pointer help text no-drop move nesw-resize ns-resize nwse-resize w-resize alias wait none not-allowed col-resize row-resize copy zoom-in zoom-out".split(" ");a.Start=function(){a.State=
790 +0;a.accumulator=null};a.Stop=function(){a.setRotation(0);a.UnGrabKeyInput();a.UnGrabMouseInput();a.touchenabled=0;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.Canvas.clearRect(0,0,a.CanvasId.width,a.CanvasId.height)};a.xxStateChange=function(b){if(a.State!=b)switch(a.State=b,a.CanvasId.style.cursor="default",b){case 0:a.Stop()}};a.send=function(b){1<a.debugmode&&console.log("KSend("+b.length+"): "+rstr2hex(b));null!=a.parent&&a.parent.send(b)};a.ProcessPictureMsg=
791 +function(b,c,d){var e=new Image;e.xcount=a.tilesReceived++;var n=a.tilesReceived;e.src="data:image/jpeg;base64,"+btoa(b.substring(4,b.length));e.onload=function(){if(null!=a.Canvas&&a.KillDraw<n&&0!=a.State)for(a.PendingOperations.push([n,2,e,c,d]);a.DoPendingOperations(););};e.error=function(){console.log("DecodeTileError")}};a.DoPendingOperations=function(){if(0==a.PendingOperations.length)return!1;for(var b=0;b<a.PendingOperations.length;b++){var c=a.PendingOperations[b];if(c[0]==a.TilesDrawn+
792 +1)return 1==c[1]?a.ProcessCopyRectMsg(c[2]):2==c[1]&&(a.Canvas.drawImage(c[2],a.rotX(c[3],c[4]),a.rotY(c[3],c[4])),delete c[2]),a.PendingOperations.splice(b,1),delete c,a.TilesDrawn++,a.TilesDrawn==a.tilesReceived&&a.KillDraw<a.TilesDrawn&&(a.KillDraw=a.TilesDrawn=a.tilesReceived=0),!0}a.oldie&&0<a.PendingOperations.length&&a.TilesDrawn++;return!1};a.ProcessCopyRectMsg=function(b){var c=((b.charCodeAt(0)&255)<<8)+(b.charCodeAt(1)&255),d=((b.charCodeAt(2)&255)<<8)+(b.charCodeAt(3)&255),e=((b.charCodeAt(4)&
793 +255)<<8)+(b.charCodeAt(5)&255),n=((b.charCodeAt(6)&255)<<8)+(b.charCodeAt(7)&255),v=((b.charCodeAt(8)&255)<<8)+(b.charCodeAt(9)&255);b=((b.charCodeAt(10)&255)<<8)+(b.charCodeAt(11)&255);a.Canvas.drawImage(Canvas.canvas,c,d,v,b,e,n,v,b)};a.SendUnPause=function(){a.send(String.fromCharCode(0,8,0,5,0))};a.SendPause=function(){a.send(String.fromCharCode(0,8,0,5,1))};a.SendCompressionLevel=function(b,c,d,e){c&&(a.CompressionLevel=c);d&&(a.ScalingLevel=d);e&&(a.FrameRateTimer=e);a.send(String.fromCharCode(0,
794 +5,0,10,b,a.CompressionLevel)+a.shortToStr(a.ScalingLevel)+a.shortToStr(a.FrameRateTimer))};a.SendRefresh=function(){a.send(String.fromCharCode(0,6,0,4))};a.ProcessScreenMsg=function(b,c){0<a.debugmode&&console.log("ScreenSize: "+b+" x "+c);a.Canvas.setTransform(1,0,0,1,0,0);a.rotation=0;a.FirstDraw=!0;a.ScreenWidth=a.width=b;a.ScreenHeight=a.height=c;for(a.KillDraw=a.tilesReceived;0<a.PendingOperations.length;)a.PendingOperations.shift();a.SendCompressionLevel(1);a.SendUnPause();if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,
795 +a.ScreenWidth,a.ScreenHeight,a.CanvasId)};a.ProcessData=function(b){for(var c=0;c<b.length;)c+=a.ProcessDataEx(b.substring(c))};a.ProcessDataEx=function(b){null!=a.accumulator&&(b=a.accumulator+b,a.accumulator=null);1<a.debugmode&&console.log("KRecv("+b.length+"): "+rstr2hex(b.substring(0,Math.min(b.length,40))));if(!(4>b.length)){var c=null,p=0,g=0,n=ReadShort(b,0),w=ReadShort(b,2),D=0;if(27==n&&8==w){if(12>b.length)return;n=ReadShort(b,8);w=ReadInt(b,4);if(w+8>b.length){a.accumulator=b;return}b=
796 +b.substring(8);D=8}w!=b.length&&0<a.debugmode&&console.log(w,b.length,w==b.length);if(18<=n&&65!=n&&88!=n)console.error("Invalid KVM command "+n+" of size "+w),console.log("Invalid KVM data",b.length,rstr2hex(b.substring(0,40))+"...");else if(w>b.length)a.accumulator=b;else{if(3==n||4==n||7==n)c=b.substring(4,w),p=((c.charCodeAt(0)&255)<<8)+(c.charCodeAt(1)&255),g=((c.charCodeAt(2)&255)<<8)+(c.charCodeAt(3)&255),0<a.debugmode&&console.log("CMD"+n+" at X="+p+" Y="+g);switch(n){case 3:if(a.FirstDraw)a.onResize();
797 +a.ProcessPictureMsg(c,p,g);break;case 4:if(a.FirstDraw)a.onResize();a.TilesDrawn==a.tilesReceived?a.ProcessCopyRectMsg(c):a.PendingOperations.push([++tilesReceived,1,c]);break;case 7:a.ProcessScreenMsg(p,g);a.SendKeyMsgKC(a.KeyAction.UP,16);a.SendKeyMsgKC(a.KeyAction.UP,17);a.SendKeyMsgKC(a.KeyAction.UP,18);a.SendKeyMsgKC(a.KeyAction.UP,91);a.SendKeyMsgKC(a.KeyAction.UP,92);a.SendKeyMsgKC(a.KeyAction.UP,16);a.send(String.fromCharCode(0,14,0,4));break;case 11:c=0;p={};g=((b.charCodeAt(4)&255)<<8)+
798 +(b.charCodeAt(5)&255);if(0<g)for(c=((b.charCodeAt(6+2*g)&255)<<8)+(b.charCodeAt(7+2*g)&255),n=0;n<g;n++){var m=((b.charCodeAt(6+2*n)&255)<<8)+(b.charCodeAt(7+2*n)&255);p[m]=65535==m?"All Displays":"Display "+m}if(null!=a.onDisplayinfo)a.onDisplayinfo(a,p,c);break;case 14:a.touchenabled=1;a.TouchArray={};if(null!=a.onTouchEnabledChanged)a.onTouchEnabledChanged(a.touchenabled);break;case 15:a.TouchArray={};break;case 16:a.connectioncount=ReadInt(b,4);if(null!=a.onConnectCountChanged)a.onConnectCountChanged(a.connectioncount,
799 +a);break;case 17:if(null!=a.onMessage)a.onMessage(b.substring(4,w),a);break;case 65:b=b.substring(4);if("."!=b[0]){if(console.log(b),null!=a.parent&&(a.parent.consoleMessage=b,a.parent.onConsoleMessageChange))a.parent.onConsoleMessageChange(a.parent,b)}else console.log("KVM: "+b.substring(1));break;case 88:if(5!=w)break;b=b.charCodeAt(4);b>v.length&&(b=0);e=v[b];d&&(a.CanvasId.style.cursor=e)}return w+D}}};a.MouseButton={NONE:0,LEFT:2,RIGHT:8,MIDDLE:32};a.KeyAction={NONE:0,DOWN:1,UP:2,SCROLL:3,EXUP:4,
800 +EXDOWN:5,DBLCLICK:6};a.InputType={KEY:1,MOUSE:2,CTRLALTDEL:10,TOUCH:15};a.Alternate=0;var n={Pause:19,CapsLock:20,Space:32,Quote:222,Minus:189,NumpadMultiply:106,NumpadAdd:107,PrintScreen:44,Comma:188,NumpadSubtract:109,NumpadDecimal:110,Period:190,Slash:191,NumpadDivide:111,Semicolon:186,Equal:187,OSLeft:91,BracketLeft:219,OSRight:91,Backslash:220,BracketRight:221,ContextMenu:93,Backquote:192,NumLock:144,ScrollLock:145,Backspace:8,Tab:9,Enter:13,NumpadEnter:13,Escape:27,Delete:46,Home:36,PageUp:33,
801 +PageDown:34,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,End:35,Insert:45,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,ShiftLeft:16,ShiftRight:16,ControlLeft:17,ControlRight:17,AltLeft:18,AltRight:18,MetaLeft:91,MetaRight:92,VolumeMute:181};a.SendKeyMsg=function(b,c){if(null!=b)if(c||(c=window.event),c.code&&0==a.localKeyMap){var d;d=c;d=d.code.startsWith("Key")&&4==d.code.length?d.code.charCodeAt(3):d.code.startsWith("Digit")&&6==d.code.length?d.code.charCodeAt(5):
802 +d.code.startsWith("Numpad")&&7==d.code.length?d.code.charCodeAt(6)+48:n[d.code];null!=d&&a.SendKeyMsgKC(b,d)}else d=c.keyCode,59==d?d=186:173==d?d=189:61==d&&(d=187),a.SendKeyMsgKC(b,d)};a.SendMessage=function(b){3==a.State&&a.send(String.fromCharCode(0,17)+a.shortToStr(4+b.length)+b)};a.SendKeyMsgKC=function(b,c){if(3==a.State)if("object"==typeof b)for(var d in b)a.SendKeyMsgKC(b[d][0],b[d][1]);else a.send(String.fromCharCode(0,a.InputType.KEY,0,6,b-1,c))};a.sendcad=function(){a.SendCtrlAltDelMsg()};
803 +a.SendCtrlAltDelMsg=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.CTRLALTDEL,0,4))};a.SendEscKey=function(){3==a.State&&a.send(String.fromCharCode(0,a.InputType.KEY,0,6,0,27,0,a.InputType.KEY,0,6,1,27))};a.SendStartMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendCharmsMsg=function(){a.SendKeyMsgKC(a.KeyAction.EXDOWN,91);a.SendKeyMsgKC(a.KeyAction.DOWN,67);a.SendKeyMsgKC(a.KeyAction.UP,67);a.SendKeyMsgKC(a.KeyAction.EXUP,91)};a.SendTouchMsg1=
804 +function(b,c,d,e){3==a.State&&a.send(String.fromCharCode(0,a.InputType.TOUCH)+a.shortToStr(14)+String.fromCharCode(1,b)+a.intToStr(c)+a.shortToStr(d)+a.shortToStr(e))};a.SendTouchMsg2=function(b,c){var d="",e,n;for(n in a.TouchArray)n==b?e=c:1==a.TouchArray[n].f?(e=65542,a.TouchArray[n].f=3):e=2==a.TouchArray[n].f?262144:131078,d+=String.fromCharCode(n)+a.intToStr(e)+a.shortToStr(a.TouchArray[n].x)+a.shortToStr(a.TouchArray[n].y),2==a.TouchArray[n].f&&delete a.TouchArray[n];3==a.State&&a.send(String.fromCharCode(0,
805 +a.InputType.TOUCH)+a.shortToStr(5+d.length)+String.fromCharCode(2)+d);0==Object.keys(a.TouchArray).length&&null!=a.touchtimer&&(clearInterval(a.touchtimer),a.touchtimer=null)};a.SendMouseMsg=function(b,c){if(3==a.State&&null!=b&&null!=a.Canvas){c||(c=window.event);var d=a.Canvas.canvas.height/a.CanvasId.clientHeight,e=a.Canvas.canvas.width/a.CanvasId.clientWidth,n=a.GetPositionOfControl(a.Canvas.canvas),e=(c.pageX-n[0])*e,d=(c.pageY-n[1])*d;c.addx&&(e+=c.addx);c.addy&&(d+=c.addy);if(0<=e&&e<=a.Canvas.canvas.width&&
806 +0<=d&&d<=a.Canvas.canvas.height){var v=n=0;b==a.KeyAction.UP||b==a.KeyAction.DOWN?c.which?1==c.which?n=a.MouseButton.LEFT:2==c.which?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT:c.button&&(0==c.button?n=a.MouseButton.LEFT:1==c.button?n=a.MouseButton.MIDDLE:n=a.MouseButton.RIGHT):b==a.KeyAction.SCROLL&&(c.detail?v=-120*c.detail:c.wheelDelta&&(v=3*c.wheelDelta));var D="",D=b==a.KeyAction.DBLCLICK?String.fromCharCode(0,a.InputType.MOUSE,0,10,0,136,e/256&255,e&255,d/256&255,d&255):b==a.KeyAction.SCROLL?
807 +String.fromCharCode(0,a.InputType.MOUSE,0,12,0,0,e/256&255,e&255,d/256&255,d&255,v/256&255,v&255):String.fromCharCode(0,a.InputType.MOUSE,0,10,0,b==a.KeyAction.DOWN?n:2*n&255,e/256&255,e&255,d/256&255,d&255);a.Action==a.KeyAction.NONE?0==a.Alternate||a.ipad?(a.send(D),a.Alternate=1):a.Alternate=0:a.send(D)}}};a.GetDisplayNumbers=function(){a.send(String.fromCharCode(0,11,0,4))};a.SetDisplay=function(b){console.log("Set display",b);a.send(String.fromCharCode(0,12,0,6,b>>8,b&255))};a.intToStr=function(a){return String.fromCharCode(a>>
808 +24&255,a>>16&255,a>>8&255,a&255)};a.shortToStr=function(a){return String.fromCharCode(a>>8&255,a&255)};a.onResize=function(){if(0!=a.ScreenWidth&&0!=a.ScreenHeight&&(a.Canvas.canvas.width!=a.ScreenWidth||a.Canvas.canvas.height!=a.ScreenHeight)){if(a.FirstDraw&&(a.Canvas.canvas.width=a.ScreenWidth,a.Canvas.canvas.height=a.ScreenHeight,a.Canvas.fillRect(0,0,a.ScreenWidth,a.ScreenHeight),null!=a.onScreenSizeChange))a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);a.FirstDraw=!1}};a.xxMouseInputGrab=
809 +!1;a.xxKeyInputGrab=!1;a.xxMouseMove=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.NONE,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseUp=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDown=function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxMouseDblClick=
810 +function(b){3==a.State&&a.SendMouseMsg(a.KeyAction.DBLCLICK,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxDOMMouseScroll=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxMouseWheel=function(b){return 3==a.State?(a.SendMouseMsg(a.KeyAction.SCROLL,b),!1):!0};a.xxKeyUp=function(b){3==a.State&&a.SendKeyMsg(a.KeyAction.UP,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyDown=function(b){3==
811 +a.State&&a.SendKeyMsg(a.KeyAction.DOWN,b);b.preventDefault&&b.preventDefault();b.stopPropagation&&b.stopPropagation();return!1};a.xxKeyPress=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};a.handleKeys=function(b){return 1==a.stopInput||3!=desktop.State?!1:a.xxKeyPress(b)};a.handleKeyUp=function(b){if(1==a.stopInput||3!=desktop.State)return!1;if(5>a.firstUpKeys.length&&(a.firstUpKeys.push(b.keyCode),5==a.firstUpKeys.length)){var c=a.firstUpKeys.join(",");
812 +if("16,17,91,91,16"==c||"16,17,18,91,92"==c)a.stopInput=!0}16==b.keyCode&&(a.shiftPressed=!1);17==b.keyCode&&(a.ctrlPressed=!1);18==b.keyCode&&(a.altPressed=!1);return a.xxKeyUp(b)};a.handleKeyDown=function(b){if(1==a.stopInput||3!=desktop.State)return!1;16==b.keyCode&&(a.shiftPressed=!0);17==b.keyCode&&(a.ctrlPressed=!0);18==b.keyCode&&(a.altPressed=!0);return a.xxKeyDown(b)};a.handleReleaseKeys=function(){a.shiftPressed&&a.SendKeyMsgKC(a.KeyAction.UP,16);a.ctrlPressed&&a.SendKeyMsgKC(a.KeyAction.UP,
813 +17);a.altPressed&&a.SendKeyMsgKC(a.KeyAction.UP,18);a.shiftPressed=a.ctrlPressed=a.altPressed=!1};a.mousedblclick=function(b){return 1==a.stopInput?!1:a.xxMouseDblClick(b)};a.mousedown=function(b){return 1==a.stopInput?!1:a.xxMouseDown(b)};a.mouseup=function(b){return 1==a.stopInput?!1:a.xxMouseUp(b)};a.mousemove=function(b){return 1==a.stopInput?!1:a.xxMouseMove(b)};a.mousewheel=function(b){return 1==a.stopInput?!1:a.xxMouseWheel(b)};a.xxMsTouchEvent=function(b){if(4!=b.originalEvent.pointerType){b.preventDefault&&
814 +b.preventDefault();b.stopPropagation&&b.stopPropagation();if("MSPointerDown"==b.type||"MSPointerMove"==b.type||"MSPointerUp"==b.type){var c=0,d=b.originalEvent.pointerId%256,e=Canvas.canvas.width/a.CanvasId.clientWidth*b.offsetX,n=Canvas.canvas.height/a.CanvasId.clientHeight*b.offsetY;"MSPointerDown"==b.type?c=65542:"MSPointerMove"==b.type?c=131078:"MSPointerUp"==b.type&&(c=262144);a.TouchArray[d]||(a.TouchArray[d]={x:e,y:n});a.SendTouchMsg2(d,c);"MSPointerUp"==b.type&&delete a.TouchArray[d]}else alert(b.type);
815 +return!0}};a.xxTouchStart=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(KeyAction.DOWN,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]||
816 +(a.TouchArray[e]={x:Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),y:Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-c[1]),f:1})}0<Object.keys(a.TouchArray).length&&null==touchtimer&&(a.touchtimer=setInterval(function(){a.SendTouchMsg2(256,0)},50))}};a.xxTouchMove=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled){if(!(1<b.originalEvent.touches.length)){var c=b.originalEvent.touches[0];
817 +b.which=1;a.LastX=b.pageX=c.pageX;a.LastY=b.pageY=c.pageY;a.SendMouseMsg(a.KeyAction.NONE,b)}}else{var c=a.GetPositionOfControl(Canvas.canvas),d;for(d in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[d].identifier){var e=b.originalEvent.changedTouches[d].identifier%256;a.TouchArray[e]&&(a.TouchArray[e].x=a.Canvas.canvas.width/a.CanvasId.clientWidth*(b.originalEvent.touches[d].pageX-c[0]),a.TouchArray[e].y=a.Canvas.canvas.height/a.CanvasId.clientHeight*(b.originalEvent.touches[d].pageY-
818 +c[1]))}}};a.xxTouchEnd=function(b){if(3==a.State)if(b.preventDefault&&b.preventDefault(),0==a.touchenabled||1==a.touchenabled)1<b.originalEvent.touches.length||(b.which=1,b.pageX=LastX,b.pageY=LastY,a.SendMouseMsg(KeyAction.UP,b));else for(var c in b.originalEvent.changedTouches)if(b.originalEvent.changedTouches[c].identifier){var d=b.originalEvent.changedTouches[c].identifier%256;a.TouchArray[d]&&(a.TouchArray[d].f=2)}};a.GrabMouseInput=function(){if(1!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=
819 +a.xxMouseMove;b.onmouseup=a.xxMouseUp;b.onmousedown=a.xxMouseDown;b.touchstart=a.xxTouchStart;b.touchmove=a.xxTouchMove;b.touchend=a.xxTouchEnd;b.MSPointerDown=a.xxMsTouchEvent;b.MSPointerMove=a.xxMsTouchEvent;b.MSPointerUp=a.xxMsTouchEvent;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=a.xxDOMMouseScroll:b.onmousewheel=a.xxMouseWheel;a.xxMouseInputGrab=!0}};a.UnGrabMouseInput=function(){if(0!=a.xxMouseInputGrab){var b=a.CanvasId;b.onmousemove=null;b.onmouseup=null;b.onmousedown=null;b.touchstart=
820 +null;b.touchmove=null;b.touchend=null;b.MSPointerDown=null;b.MSPointerMove=null;b.MSPointerUp=null;navigator.userAgent.match(/mozilla/i)?b.DOMMouseScroll=null:b.onmousewheel=null;a.xxMouseInputGrab=!1}};a.GrabKeyInput=function(){1!=a.xxKeyInputGrab&&(document.onkeyup=a.xxKeyUp,document.onkeydown=a.xxKeyDown,document.onkeypress=a.xxKeyPress,a.xxKeyInputGrab=!0)};a.UnGrabKeyInput=function(){0!=a.xxKeyInputGrab&&(document.onkeyup=null,document.onkeydown=null,document.onkeypress=null,a.xxKeyInputGrab=
821 +!1)};a.GetPositionOfControl=function(a){var b=Array(2);for(b[0]=b[1]=0;a;)b[0]+=a.offsetLeft,b[1]+=a.offsetTop,a=a.offsetParent;return b};a.crotX=function(b,c){if(0==a.rotation)return b;if(1==a.rotation)return c;if(2==a.rotation)return a.Canvas.canvas.width-b;if(3==a.rotation)return a.Canvas.canvas.height-c};a.crotY=function(b,c){if(0==a.rotation)return c;if(1==a.rotation)return a.Canvas.canvas.width-b;if(2==a.rotation)return a.Canvas.canvas.height-c;if(3==a.rotation)return b};a.rotX=function(b,c){if(0==
822 +a.rotation||1==a.rotation)return b;if(2==a.rotation)return b-a.Canvas.canvas.width;if(3==a.rotation)return b-a.Canvas.canvas.height};a.rotY=function(b,c){if(0==a.rotation||3==a.rotation)return c;if(1==a.rotation)return c-a.Canvas.canvas.width;if(2==a.rotation)return c-a.Canvas.canvas.height};a.tcanvas=null;a.setRotation=function(b){for(;0>b;)b+=4;b%=4;if(b==a.rotation)return!0;var c=a.Canvas.canvas.width,d=a.Canvas.canvas.height;if(1==a.rotation||3==a.rotation)c=a.Canvas.canvas.height,d=a.Canvas.canvas.width;
823 +null==a.tcanvas&&(a.tcanvas=document.createElement("canvas"));var e=a.tcanvas.getContext("2d");e.setTransform(1,0,0,1,0,0);e.canvas.width=c;e.canvas.height=d;e.rotate(-90*a.rotation*Math.PI/180);0==a.rotation&&e.drawImage(a.Canvas.canvas,0,0);1==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,0);2==a.rotation&&e.drawImage(a.Canvas.canvas,-a.Canvas.canvas.width,-a.Canvas.canvas.height);3==a.rotation&&e.drawImage(a.Canvas.canvas,0,-a.Canvas.canvas.height);if(0==a.rotation||2==a.rotation)a.Canvas.canvas.height=
824 +c,a.Canvas.canvas.width=d;if(1==a.rotation||3==a.rotation)a.Canvas.canvas.height=d,a.Canvas.canvas.width=c;a.Canvas.setTransform(1,0,0,1,0,0);a.Canvas.rotate(90*b*Math.PI/180);a.rotation=b;a.Canvas.drawImage(a.tcanvas,a.rotX(0,0),a.rotY(0,0));a.ScreenWidth=a.Canvas.canvas.width;a.ScreenHeight=a.Canvas.canvas.height;if(null!=a.onScreenSizeChange)a.onScreenSizeChange(a,a.ScreenWidth,a.ScreenHeight,a.CanvasId);return!0};a.MuchTheSame=function(a,b){return 4>Math.abs(a-b)};a.Debug=function(a){console.log(a)};
825 +a.getIEVersion=function(){var a=-1;"Microsoft Internet Explorer"==navigator.appName&&null!=/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1));return a};a.haltEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};return a},CreateKvmDataChannel=function(b,c,a){var d={};d.m=c;c.parent=d;d.webchannel=b;d.State=0;d.protocol=c.protocol;d.onStateChanged=null;d.onControlMsg=null;d.debugmode=0;d.keepalive=a;d.rtcKeepAlive=null;
826 +d.Start=function(){1==d.debugmode&&console.log("start");d.xxStateChange(3);d.webchannel.onmessage=d.xxOnMessage;d.rtcKeepAlive=setInterval(d.xxSendRtcKeepAlive,3E4)};var e=new FileReader,v=!1,n=[];e.readAsBinaryString?e.onload=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsBinaryString(new Blob([n.shift()]))}:e.readAsArrayBuffer&&(e.onloadend=function(a){d.xxOnSocketData(a.target.result);0==n.length?v=!1:e.readAsArrayBuffer(n.shift())});d.xxOnMessage=function(a){if("string"==
827 +typeof a.data){if(null!=d.onControlMsg)d.onControlMsg(a.data)}else if("object"==typeof a.data)if(1==v)n.push(a.data);else if(e.readAsBinaryString)v=!0,e.readAsBinaryString(new Blob([a.data]));else if(f.readAsArrayBuffer)v=!0,e.readAsArrayBuffer(a.data);else{var b="";a=new Uint8Array(a.data);for(var c=a.byteLength,g=0;g<c;g++)b+=String.fromCharCode(a[g]);d.xxOnSocketData(b)}else d.xxOnSocketData(a.data)};d.xxOnSocketData=function(a){if(a){if("object"===typeof a){var b="";a=new Uint8Array(a);for(var c=
828 +a.byteLength,e=0;e<c;e++)b+=String.fromCharCode(a[e]);a=b}else if("string"!==typeof a)return;return d.m.ProcessData(a)}};d.sendCtrlMsg=function(a){"string"==typeof a&&(d.webchannel.send(a),urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+"): ",typeof a,a),null!=d.keepalive&&d.keepalive.sendKeepAlive())};d.send=function(a){if("string"==typeof a){for(var b=new Uint8Array(a.length),c=0;c<a.length;++c)b[c]=a.charCodeAt(c);a=b}urlvars&&urlvars.webrtctrace&&console.log("WebRTC-Send("+d.State+
829 +"): ",typeof a,a);d.webchannel.send(a)};d.xxStateChange=function(a){if(d.State!=a&&(d.State=a,d.m.xxStateChange(d.State),null!=d.onStateChanged))d.onStateChanged(d,d.State)};d.Stop=function(){1==d.debugmode&&console.log("stop");null!=d.rtcKeepAlive&&(clearInterval(d.rtcKeepAlive),d.rtcKeepAlive=null);d.xxStateChange(0)};d.xxSendRtcKeepAlive=function(){urlvars&&urlvars.webrtctrace&&console.log("WebRTC-SendKeepAlive()");d.sendCtrlMsg(JSON.stringify({action:"ping"}))};return d},CreateAmtRemoteTerminal=
830 +function(b,c){function a(b){if("\x00"!=b&&7!=b.charCodeAt()){var c=b.charCodeAt();1==l.terminalEmulation?0!=(c&128)&&(b=String.fromCharCode(r[c&127])):2==l.terminalEmulation&&0!=(c&128)&&(b=String.fromCharCode(N[c&127]));switch(c){case 16:b=" ";break;case 24:b="\u2191";break;case 25:b="\u2193"}D>l.width&&(D=l.width);m>l.height-1&&(m=l.height-1);switch(b){case "\b":0<D&&(D--,R&&d(" "));break;case "\t":b=8-D%8;for(c=0;c<b;c++)a(" ");break;case "\n":m++;m>E[1]&&(l.recordLineTobackBuffer(0),n(1),m=E[1]);
831 +l.lineFeed="\r";D=0;break;case "\r":D=0;break;default:D>=l.width&&(D=0,w&&m++,m>=l.height-1&&(n(1),m=l.height-1)),d(b),D++}}}function d(a){A[m][D]=a;z[m][D]=(g<<6)+(B<<12)+p}function e(){for(var a=(g<<6)+(B<<12)+p,b=D;b<l.width;b++)A[m][b]=" ",z[m][b]=a}function v(a){for(var b=(g<<6)+(B<<12)+p,c=0;c<l.width;c++)A[a][c]=" ",z[a][c]=b}function n(a){var b;for(b=E[0];b<=E[1]-a;b++)A[b]=A[b+a],z[b]=z[b+a];for(b=E[1]-a+1;b<=E[1];b++)for(A[b]=[],z[b]=[],a=0;a<l.width;a++)A[b][a]=" ",z[b][a]=448}var l={};
832 +l.DivId=b;l.DivElement=document.getElementById(b);l.protocol=1;c&&c.protocol&&(l.protocol=c.protocol);l.terminalEmulation=1;l.fxEmulation=0;l.lineFeed="\r\n";l.debugmode=0;l.width=80;l.height=25;l.heightLock=0;var q="000000 BB0000 00BB00 BBBB00 0000BB BB00BB 00BBBB BBBBBB 555555 FF5555 55FF55 FFFF55 5555FF FF55FF 55FFFF FFFFFF".split(" "),p=0,g=7,B=0,w=!0,D=0,m=0,k=0,h=0,u=0,O=[],C=0,x=0,z=[],A=[],R=!1,y=!0,E,H=!1,J=[],P="";l.title=null;l.onTitleChange=null;l.Start=function(){};l.Init=function(a,
833 +b){l.width=a?a:80;l.height=b?b:25;for(var c=0;c<l.height;c++){A[c]=[];z[c]=[];for(var d=0;d<l.width;d++)A[c][d]=" ",z[c][d]=448}l.TermInit();l.TermDraw()};l.xxStateChange=function(a){3==a&&null!=c&&1==c.xterm&&l.TermSendKeys("stty rows "+l.height+" cols "+l.width+"\nclear\n")};l.ProcessData=function(b){2==l.debugmode&&console.log("TRecv("+b.length+"): "+rstr2hex(b));null!=l.capture&&(l.capture+=b);if(0==l.terminalEmulation)try{b=decode_utf8(P+b)}catch(c){P+=b;return}P="";for(var d=0;d<b.length;d++){var q=
834 +String.fromCharCode(b.charCodeAt(d)),n=b.charCodeAt(d);switch(u){case 0:switch(n){case 27:u=1;O=[];x=C=0;break;default:a(q)}break;case 1:switch(q){case "[":u=2;break;case "(":u=4;break;case ")":u=5;break;case "]":u=6;break;case "=":H=!0;u=0;break;case ">":H=!1;u=0;break;case "7":k=D;h=m;u=0;break;case "8":D=k;m=h;u=0;break;case "M":for(n=E[1];n>=E[0]+1;n--)for(var r=0;r<l.width;r++)A[n][r]=A[n-1][r],z[n][r]=z[n-1][r];for(n=E[0]+1-1;n>E[0]-1;n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;u=0;break;
835 +default:console.log("unknown terminal short code",q),u=0}break;case 2:if("0"<=q&&"9">=q){O[C]=O[C]?10*O[C]+(q-0):q-0;break}else if(";"==q){C++;break}else if("?"==q){x=1;break}else{O[0]||(O[0]=0);var n=O,r=C+1,R=x;if(1==R)switch(q){case "l":25==n[0]&&(y=!1);break;case "h":25==n[0]&&(y=!0)}else if(0==R){var I=void 0;switch(q){case "c":l.TermResetScreen();break;case "A":1==r&&(0==n[0]?m--:m-=n[0],0>m&&(m=0));break;case "B":1==r&&(0==n[0]?m++:m+=n[0],m>l.height&&(m=l.height));break;case "C":1==r&&(0==
836 +n[0]?D++:D+=n[0],D>l.width&&(D=l.width));break;case "D":1==r&&(0==n[0]?D--:D-=n[0],0>D&&(D=0));break;case "d":1==r&&(m=n[0]-1,m>l.height&&(m=l.height),0>m&&(m=0));break;case "G":1==r&&(D=n[0]-1,0>D&&(D=0),D>l.width-1&&(D=l.width-1));break;case "P":q=1;1==r&&(q=n[0]);for(I=D;I<l.width-q;I++)A[m][I]=A[m][I+q],z[m][I]=z[m][I+q];for(I=l.width-q;I<l.width;I++)A[m][I]=" ",z[m][I]=448;break;case "L":I=1;1==r&&(I=n[0]);0==I&&(I=1);for(n=E[1];n>=m+I;n--)A[n]=A[n-I],z[n]=z[n-I];for(n=m;n<m+I;n++)for(A[n]=[],
837 +z[n]=[],q=0;q<l.width;q++)A[n][q]=" ",z[n][q]=448;break;case "J":if(1==r&&2==n[0])l.TermClear((B<<12)+(g<<6)),m=D=0,J=[];else if(0==r||1==r&&0==n[0])for(e(),I=m+1;I<l.height;I++)v(I);else if(1==r&&1==n[0])for(e(),I=0;I<m-1;I++)v(I);break;case "H":2==r?(1>n[0]&&(n[0]=1),1>n[1]&&(n[1]=1),n[0]>l.height&&(n[0]=l.height),n[1]>l.width&&(n[1]=l.width),m=n[0]-1,D=n[1]-1):D=m=0;break;case "m":for(I=0;I<r;I++)n[I]&&0!=n[I]?1==n[I]?8>g&&(g+=8):2==n[I]||22==n[I]?8<=g&&(g-=8):7==n[I]?p=2:27==n[I]?p=0:30<=n[I]&&
838 +37>=n[I]?(q=8<=g,g=n[I]-30,q&&8>=g&&(g+=8)):40<=n[I]&&47>=n[I]?B=n[I]-40:90<=n[I]&&99>=n[I]?g=n[I]-82:100<=n[I]&&109>=n[I]&&(B=n[I]-92):(B=0,g=7,p=0);break;case "K":if(0!=r&&(1!=r||n[0]&&0!=n[0])){if(1==r)if(1==n[0])for(n=(g<<6)+(B<<12)+p,r=0;r<D;r++)A[m][r]=" ",z[m][r]=n;else 2==n[0]&&v(m)}else e();break;case "h":w=!0;break;case "l":w=!1;break;case "r":2==r&&(E=[n[0]-1,n[1]-1]);0>E[0]&&(E[0]=0);E[0]>l.height-1&&(E[0]=l.height-1);0>E[1]&&(E[1]=0);E[1]>l.height-1&&(E[1]=l.height-1);E[0]>E[1]&&(E[0]=
839 +E[1]);break;case "S":q=1;1==r&&(q=n[0]);for(n=E[0];n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "M":q=1;1==r&&(q=n[0]);for(n=m;n<=E[1]-q;n++)for(r=0;r<l.width;r++)A[n][r]=A[n+q][r],z[n][r]=z[n+q][r];for(n=E[1]-q+1;n<E[1];n++)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "T":q=1;1==r&&(q=n[0]);for(n=E[1];n>E[0]+q;n--)for(r=0;r<l.width;r++)A[n][r]=A[n-q][r],z[n][r]=z[n-q][r];for(n=
840 +E[0]+q;n>E[0];n--)for(r=0;r<l.width;r++)A[n][r]=" ",z[n][r]=448;break;case "X":q=1;I=D;R=m;for(1==r&&(q=n[0]);0<q&&R<l.height;)A[R][I]=" ",I++,q--,I>=l.width&&(I=0,R++);break;default:console.log("unknown terminal code",q,n,R)}}u=0}break;case 4:u=0;break;case 5:u=0;break;case 6:if(n=q.charCodeAt(0),";"==q)C++;else if(7==n){n=O;if(0!=n.length&&(r=parseInt(n[0]),(0==r||2==r)&&1<n.length&&"?"!=n[1]&&l.onTitleChange))l.onTitleChange(l,l.title=n[1]);u=0}else O[C]=O[C]?O[C]+q:q}}l.TermDraw()};l.ProcessVt100String=
841 +function(b){for(var c=0;c<b.length;c++)a(String.fromCharCode(b.charCodeAt(c)))};var r=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,171,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,
842 +9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160],N=[199,252,233,226,228,224,229,231,234,235,232,239,238,236,196,197,201,230,198,244,246,242,251,249,255,214,220,162,163,165,8359,402,225,237,243,250,241,209,170,218,191,8976,172,189,188,161,174,187,9619,9618,9617,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,
843 +9552,9580,9575,9576,9572,9573,9576,9560,9554,9555,9579,9578,9496,9484,9608,9604,9611,9616,9600,945,223,915,960,931,963,181,964,966,952,8486,948,8734,248,949,8719,8801,177,8805,8806,8992,8993,247,8776,176,8226,183,8730,8319,178,8718,160];l.TermClear=function(a){for(var b=0;b<l.height;b++)for(var c=0;c<l.width;c++)A[b][c]=" ",z[b][c]=a;J=[]};l.TermResetScreen=function(){p=0;g=7;B=0;w=y=!0;D=m=0;R=!1;E=[0,l.height-1];H=!1;l.TermClear(448);P=""};l.TermSendKeys=function(a){2==l.debugmode&&console.log("TSend("+
844 +a.length+"): "+rstr2hex(a),a);l.parent&&l.parent.Send(a)};l.TermSendKey=function(a){2==l.debugmode&&console.log("TSend(1): "+rstr2hex(String.fromCharCode(a)),a);l.parent&&l.parent.Send(String.fromCharCode(a))};l.TermHandleKeys=function(a){if(!a.ctrlKey)return 127==a.which?l.TermSendKey(8):13==a.which?l.TermSendKeys(l.lineFeed):0!=a.which&&l.TermSendKey(a.which),!1;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};l.TermHandleKeyUp=function(a){if(8!=a.which&&32!=a.which&&
845 +9!=a.which)return!0;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1};l.TermHandleKeyDown=function(a){if(65<=a.which&&90>=a.which&&1==a.ctrlKey)l.TermSendKey(a.which-64),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation();else{if(27==a.which)return l.TermSendKeys(String.fromCharCode(27)),!0;if(1==H){if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,79,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,79,65)),!0;
846 +if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,79,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,79,66)),!0}else{if(37==a.which)return l.TermSendKeys(String.fromCharCode(27,91,68)),!0;if(38==a.which)return l.TermSendKeys(String.fromCharCode(27,91,65)),!0;if(39==a.which)return l.TermSendKeys(String.fromCharCode(27,91,67)),!0;if(40==a.which)return l.TermSendKeys(String.fromCharCode(27,91,66)),!0}if(33==a.which)return l.TermSendKeys(String.fromCharCode(27,91,53,126)),
847 +!0;if(34==a.which)return l.TermSendKeys(String.fromCharCode(27,91,54,126)),!0;if(35==a.which)return l.TermSendKeys(String.fromCharCode(27,91,70)),!0;if(36==a.which)return l.TermSendKeys(String.fromCharCode(27,91,72)),!0;if(45==a.which)return l.TermSendKeys(String.fromCharCode(27,91,50,126)),!0;if(46==a.which)return l.TermSendKeys(String.fromCharCode(27,91,51,126)),!0;if(9==a.which)return l.TermSendKeys("\t"),a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation(),!0;var b=[80,
848 +81,119,120,116,117,113,114,112,77],c=[49,50,51,52,53,54,55,56,57,48,33,64],d=[80,81,82,83,84,85,86,87,88,89,90,91];if(111<a.which&124>a.which&&0==a.repeat){if(0==l.fxEmulation&&122>a.which)return l.TermSendKeys(String.fromCharCode(27,91,79,b[a.which-112])),!0;if(1==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,c[a.which-112])),!0;if(2==l.fxEmulation)return l.TermSendKeys(String.fromCharCode(27,79,d[a.which-112])),!0}if(8!=a.which&&32!=a.which&&9!=a.which)return!0;l.TermSendKey(a.which);
849 +a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}};l.recordLineTobackBuffer=function(a){var b;b=l.TermDrawLine("",a,"");a=b[0];b=b[1];J.push(a+b+"<br>")};l.TermDrawLine=function(a,b,c){for(var d,e=1,g,h=0;h<l.width;++h)switch(d=z[b][h],D==h&&m==b&&y&&(d|=2),d!=e&&(a+=c,c="",e=6,g=12,d&2&&(e=12,g=6),a+='<span style="color:#'+q[d>>e&63]+";background-color:#"+q[d>>g&63],d&1&&(a+=";text-decoration:underline"),a+=';">',c="</span>"+c,e=d),d=A[b][h],d){case "&":a+="&amp;";
850 +break;case "<":a+="&lt;";break;case ">":a+="&gt;";break;case " ":a+="&nbsp;";break;default:a+=d}return[a,c]};l.TermDraw=function(){for(var a="",b="",c=0;c<l.height;++c)a=l.TermDrawLine(b,c,a),b=a[0],a=a[1],c!=l.height-1&&(b+="<br>");800<J.length&&(J=J.slice(J.length-800));c=J.join("");l.DivElement.innerHTML='<font size="4"><b>'+c+b+a+"</b></font>";l.DivElement.scrollTop=l.DivElement.scrollHeight};l.TermInit=function(){l.TermResetScreen()};null!=c&&null!=c.width&&null!=c.height?l.Init(c.width,c.height):
851 +l.Init();return l},ZLIB=ZLIB||{};
852 "undefined"===typeof ZLIB.common_initialized&&(ZLIB.Z_NO_FLUSH=0,ZLIB.Z_PARTIAL_FLUSH=1,ZLIB.Z_SYNC_FLUSH=2,ZLIB.Z_FULL_FLUSH=3,ZLIB.Z_FINISH=4,ZLIB.Z_BLOCK=5,ZLIB.Z_TREES=6,ZLIB.Z_OK=0,ZLIB.Z_STREAM_END=1,ZLIB.Z_NEED_DICT=2,ZLIB.Z_ERRNO=-1,ZLIB.Z_STREAM_ERROR=-2,ZLIB.Z_DATA_ERROR=-3,ZLIB.Z_MEM_ERROR=-4,ZLIB.Z_BUF_ERROR=-5,ZLIB.Z_VERSION_ERROR=-6,ZLIB.Z_DEFLATED=8,ZLIB.z_stream=function(){this.total_out=this.avail_out=this.next_out=this.total_in=this.avail_in=this.next_in=0;this.state=this.msg=null;
853 this.adler=this.data_type=0;this.output_data=this.input_data="";this.error=0;this.checksum_function=null},ZLIB.gz_header=function(){this.xflags=this.time=this.text=0;this.os=255;this.extra=null;this.extra_max=this.extra_len=0;this.name=null;this.name_max=0;this.comment=null;this.done=this.hcrc=this.comm_max=0},ZLIB.common_initialized=!0);"undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js");
851 -(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,h=a.lens,l=2==b?a.nlen:0,m=a.codes,n;n=1==b?a.nlen:2==b?a.ndist:19;var p,q,v,w,y,z,B,E,D,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);y=Array(16);for(p=0;15>=p;p++)M[p]=0;for(q=0;q<n;q++)M[h[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(p=z=1;15>=p;p++)if(z<<=1,z-=M[p],0>z)return-1;if(0<z&&(0==
852 -b||1!=v))return a.next=c,-1;y[1]=0;for(p=1;15>p;p++)y[p+1]=y[p]+M[p];for(q=0;q<n;q++)0!=h[l+q]&&(e[y[h[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=g;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=E=0;p=d;S=c;n=w;y=0;W=-1;B=1<<w;G=B-1;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;for(;;){F={op:0,bits:p-y,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<p-y;d=D=1<<n;do D-=z,m[S+(E>>>y)+D]=F;while(0!=D);for(z=1<<p-1;E&z;)z>>>=1;
853 -0!=z?(E&=z-1,E+=z):E=0;q++;if(0==--M[p]){if(p==v)break;p=h[l+e[q]]}if(p>w&&(E&G)!=W){0==y&&(y=w);S+=d;n=p-y;for(z=1<<n;n+y<v;){z-=M[n+y];if(0>=z)break;n++;z<<=1}B+=1<<n;if(1==b&&852<=B||2==b&&592<=B)return a.next=c,1;W=E&G;m[c+W]={op:n,bits:w,val:S-c}}}0!=E&&(m[S+E]={op:64,bits:p-y,val:0});a.next=c+B;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
854 +(function(){function b(a,b){var c=a.next,d=2==b?a.distbits:a.lenbits,e=a.work,g=a.lens,l=2==b?a.nlen:0,m=a.codes,p;p=1==b?a.nlen:2==b?a.ndist:19;var n,q,v,w,x,z,D,B,C,W,G,F,S,Z,ca,fa,ga,T,M=Array(16);x=Array(16);for(n=0;15>=n;n++)M[n]=0;for(q=0;q<p;q++)M[g[l+q]]++;w=d;for(v=15;1<=v&&0==M[v];v--);w>v&&(w=v);if(0==v)return F={op:64,bits:1,val:0},m[c++]=F,m[c++]=F,2==b?a.distbits=1:a.lenbits=1,a.next=c,0;for(d=1;d<v&&0==M[d];d++);w<d&&(w=d);for(n=z=1;15>=n;n++)if(z<<=1,z-=M[n],0>z)return-1;if(0<z&&(0==
855 +b||1!=v))return a.next=c,-1;x[1]=0;for(n=1;15>n;n++)x[n+1]=x[n]+M[n];for(q=0;q<p;q++)0!=g[l+q]&&(e[x[g[l+q]]++]=q);switch(b){case 0:Z=fa=e;ga=ca=0;T=19;break;case 1:Z=k;ca=-257;fa=h;ga=-257;T=256;break;default:Z=u,fa=O,ga=ca=0,T=-1}q=B=0;n=d;S=c;p=w;x=0;W=-1;D=1<<w;G=D-1;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;for(;;){F={op:0,bits:n-x,val:0};e[q]<T?F.val=e[q]:e[q]>T?(F.op=fa[ga+e[q]],F.val=Z[ca+e[q]]):F.op=96;z=1<<n-x;d=C=1<<p;do C-=z,m[S+(B>>>x)+C]=F;while(0!=C);for(z=1<<n-1;B&z;)z>>>=1;
856 +0!=z?(B&=z-1,B+=z):B=0;q++;if(0==--M[n]){if(n==v)break;n=g[l+e[q]]}if(n>w&&(B&G)!=W){0==x&&(x=w);S+=d;p=n-x;for(z=1<<p;p+x<v;){z-=M[p+x];if(0>=z)break;p++;z<<=1}D+=1<<p;if(1==b&&852<=D||2==b&&592<=D)return a.next=c,1;W=B&G;m[c+W]={op:p,bits:w,val:S-c}}}0!=B&&(m[S+B]={op:64,bits:n-x,val:0});a.next=c+D;2==b?a.distbits=w:a.lenbits=w;return 0}function c(a){var b,c=Array(a);for(b=0;b<a;b++)c[b]=0;return c}function a(a,b,c){return a&&b in a?a[b]:c}function d(){return 0}function e(){var a;this.total=this.check=
857 this.dmax=this.flags=this.havedict=this.wrap=this.last=this.mode=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.next=this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=this.distcode=this.lencode=this.extra=this.offset=this.length=this.bits=this.hold=0;this.lens=c(320);this.work=c(288);this.codes=Array(1444);var b={op:0,bits:0,val:0};for(a=0;1444>a;a++)this.codes[a]=b;this.was=this.back=this.sane=0}function v(a,b){a.state.check=a.checksum_function(a.state.check,
855 -[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function p(a){a.hold=0;a.bits=0}function q(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function h(a,b){for(;a.bits<b;)if(!q(a))return!1;return!0}function B(a,b){return a.hold&
856 -(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function E(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
858 +[b&255,b>>>8&255],0,2)}function n(a,b){b.strm=a;b.left=a.avail_out;b.next=a.next_in;b.have=a.avail_in;b.hold=a.state.hold;b.bits=a.state.bits;return b}function l(a){var b=a.strm;b.next_in=a.next;b.avail_out=a.left;b.avail_in=a.have;b.state.hold=a.hold;b.state.bits=a.bits}function q(a){a.hold=0;a.bits=0}function p(a){if(0==a.have)return!1;a.have--;a.hold+=(a.strm.input_data.charCodeAt(a.next++)&255)<<a.bits;a.bits+=8;return!0}function g(a,b){for(;a.bits<b;)if(!p(a))return!1;return!0}function B(a,b){return a.hold&
859 +(1<<b)-1}function w(a,b){a.hold>>>=b;a.bits-=b}function D(a){a.hold>>>=a.bits&7;a.bits-=a.bits&7}function m(a){return(a>>>24&255)+(a>>>8&65280)+((a&65280)<<8)+((a&255)<<24)}var k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],h=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],O=[16,16,16,
860 16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ";ZLIB.inflateResetKeep=function(a){var b;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;b=a.state;a.total_in=a.total_out=b.total=0;a.msg=null;b.wrap&&(a.adler=b.wrap&1);b.mode=0;b.last=0;b.havedict=0;b.dmax=32768;b.head=null;b.hold=0;b.bits=0;b.lencode=0;b.distcode=0;b.next=0;b.sane=1;b.back=-1;return ZLIB.Z_OK};ZLIB.inflateReset=function(a,b){var c,
861 e;if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;e=a.state;"undefined"===typeof b&&(b=15);0>b?(c=0,b=-b):(c=(b>>>4)+1,48>b&&(b&=15));a.checksum_function=1==c&&"function"===typeof ZLIB.adler32?ZLIB.adler32:2==c&&"function"===typeof ZLIB.crc32?ZLIB.crc32:d;if(b&&(8>b||15<b))return ZLIB.Z_STREAM_ERROR;e.window&&e.wbits!=b&&(e.window=null);e.wrap=c;e.wbits=b;e.wsize=0;e.whave=0;e.wnext=0;return ZLIB.inflateResetKeep(a)};ZLIB.inflateInit=function(a){var b=new ZLIB.z_stream;b.state=new e;ZLIB.inflateReset(b,
859 -a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var D=null,y=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,g,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);g=e.have;k=e.left;
860 -O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!h(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);p(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
861 -29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;p(e);break;case 1:if(!h(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);p(e);d.mode=2;case 2:if(!h(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
862 -[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));p(e);d.mode=3;case 3:if(!h(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);p(e);d.mode=4;case 4:if(d.flags&1024){if(!h(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);p(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
862 +a);return b};ZLIB.inflatePrime=function(a,b,c){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a=a.state;if(0>b)return a.hold=0,a.bits=0,ZLIB.Z_OK;if(16<b||32<a.bits+b)return ZLIB.Z_STREAM_ERROR;a.hold+=(c&(1<<b)-1)<<a.bits;a.bits+=b;return ZLIB.Z_OK};var C=null,x=null,z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(a,c){var d,e,h,k,u,r=-1,N=-1,O;if(!a||!a.state||!a.input_data&&0!=a.avail_in)return ZLIB.Z_STREAM_ERROR;d=a.state;11==d.mode&&(d.mode=12);e={};n(a,e);h=e.have;k=e.left;
863 +O=ZLIB.Z_OK;a:for(;;)switch(d.mode){case 0:if(0==d.wrap){d.mode=12;break}if(!g(e,16))break a;if(d.wrap&2&&35615==e.hold){d.check=a.checksum_function(0,null,0,0);v(a,e.hold);q(e);d.mode=1;break}d.flags=0;null!==d.head&&(d.head.done=-1);if(!(d.wrap&1)||((B(e,8)<<8)+(e.hold>>>8))%31){a.msg="incorrect header check";d.mode=29;break}if(B(e,4)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}w(e,4);r=B(e,4)+8;if(0==d.wbits)d.wbits=r;else if(r>d.wbits){a.msg="invalid window size";d.mode=
864 +29;break}d.dmax=1<<r;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=e.hold&512?9:11;q(e);break;case 1:if(!g(e,16))break a;d.flags=e.hold;if((d.flags&255)!=ZLIB.Z_DEFLATED){a.msg="unknown compression method";d.mode=29;break}if(d.flags&57344){a.msg="unknown header flags set";d.mode=29;break}null!==d.head&&(d.head.text=e.hold>>>8&1);d.flags&512&&v(a,e.hold);q(e);d.mode=2;case 2:if(!g(e,32))break a;null!==d.head&&(d.head.time=e.hold);d.flags&512&&(u=e.hold,a.state.check=a.checksum_function(a.state.check,
865 +[u&255,u>>>8&255,u>>>16&255,u>>>24&255],0,4));q(e);d.mode=3;case 3:if(!g(e,16))break a;null!==d.head&&(d.head.xflags=e.hold&255,d.head.os=e.hold>>>8);d.flags&512&&v(a,e.hold);q(e);d.mode=4;case 4:if(d.flags&1024){if(!g(e,16))break a;d.length=e.hold;null!==d.head&&(d.head.extra_len=e.hold);d.flags&512&&v(a,e.hold);q(e);d.head.extra=""}else null!==d.head&&(d.head.extra=null);d.mode=5;case 5:if(d.flags&1024&&(u=d.length,u>e.have&&(u=e.have),u&&(null!==d.head&&null!==d.head.extra&&(r=d.head.extra_len-
866 d.length,d.head.extra+=a.input_data.substring(e.next,e.next+(r+u>d.head.extra_max?d.head.extra_max-r:u))),d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u)),e.have-=u,e.next+=u,d.length-=u),d.length))break a;d.length=0;d.mode=6;case 6:if(d.flags&2048){if(0==e.have)break a;null!==d.head&&null===d.head.name&&(d.head.name="");u=0;do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.name_max&&(d.head.name+=r,d.length++)}while(u<e.have);d.flags&
867 512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.name=null);d.length=0;d.mode=7;case 7:if(d.flags&4096){if(0==e.have)break a;u=0;null!==d.head&&null===d.head.comment&&(d.head.comment="");do{r=a.input_data.charAt(e.next+u);u++;if("\x00"===r)break;null!==d.head&&d.length<d.head.comm_max&&(d.head.comment+=r,d.length++)}while(u<e.have);d.flags&512&&(d.check=a.checksum_function(d.check,a.input_data,e.next,u));e.have-=
865 -u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!h(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}p(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!h(e,32))break a;a.adler=d.check=m(e.hold);p(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
866 -11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){E(e);d.mode=26;break}if(!h(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;D||(D=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
868 +u;e.next+=u;if("\x00"!==r)break a}else null!==d.head&&(d.head.comment=null);d.mode=8;case 8:if(d.flags&512){if(!g(e,16))break a;if(e.hold!=(d.check&65535)){a.msg="header crc mismatch";d.mode=29;break}q(e)}null!==d.head&&(d.head.hcrc=d.flags>>>9&1,d.head.done=1);a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=11;break;case 9:if(!g(e,32))break a;a.adler=d.check=m(e.hold);q(e);d.mode=10;case 10:if(0==d.havedict)return l(e),ZLIB.Z_NEED_DICT;a.adler=d.check=a.checksum_function(0,null,0,0);d.mode=
869 +11;case 11:if(c==ZLIB.Z_BLOCK||c==ZLIB.Z_TREES)break a;case 12:if(d.last){D(e);d.mode=26;break}if(!g(e,3))break a;d.last=B(e,1);w(e,1);switch(B(e,2)){case 0:d.mode=13;break;case 1:u=d;r=void 0;C||(C=[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},
870 {op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,
871 bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,
872 val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},
@@ -885,22 +888,22 @@ val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bi
888 {op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,
889 bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,
890 val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},
888 -{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);y||(y=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
889 -bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=D[r];for(r=0;32>r;r++)u.codes[r+512]=y[r];u.lenbits=9;u.distbits=5;
890 -d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:E(e);if(!h(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;p(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
891 -u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!h(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!h(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
892 -case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!h(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!h(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!h(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
891 +{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}]);x||(x=[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,
892 +bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}]);u.lencode=0;u.distcode=512;for(r=0;512>r;r++)u.codes[r]=C[r];for(r=0;32>r;r++)u.codes[r+512]=x[r];u.lenbits=9;u.distbits=5;
893 +d.mode=19;if(c==ZLIB.Z_TREES){w(e,2);break a}break;case 2:d.mode=16;break;case 3:a.msg="invalid block type",d.mode=29}w(e,2);break;case 13:D(e);if(!g(e,32))break a;if((e.hold&65535)!=(e.hold>>>16&65535^65535)){a.msg="invalid stored block lengths";d.mode=29;break}d.length=e.hold&65535;q(e);d.mode=14;if(c==ZLIB.Z_TREES)break a;case 14:d.mode=15;case 15:if(u=d.length){u>e.have&&(u=e.have);u>e.left&&(u=e.left);if(0==u)break a;a.output_data+=a.input_data.substring(e.next,e.next+u);a.next_out+=u;e.have-=
894 +u;e.next+=u;e.left-=u;d.length-=u;break}d.mode=11;break;case 16:if(!g(e,14))break a;d.nlen=B(e,5)+257;w(e,5);d.ndist=B(e,5)+1;w(e,5);d.ncode=B(e,4)+4;w(e,4);if(286<d.nlen||30<d.ndist){a.msg="too many length or distance symbols";d.mode=29;break}d.have=0;d.mode=17;case 17:for(;d.have<d.ncode;){if(!g(e,3))break a;u=B(e,3);d.lens[z[d.have++]]=u;w(e,3)}for(;19>d.have;)d.lens[z[d.have++]]=0;d.next=0;d.lencode=0;d.lenbits=7;if(O=b(d,0)){a.msg="invalid code lengths set";d.mode=29;break}d.have=0;d.mode=18;
895 +case 18:for(;d.have<d.nlen+d.ndist;){for(;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(16>u.val)w(e,u.bits),d.lens[d.have++]=u.val;else{if(16==u.val){if(!g(e,u.bits+2))break a;w(e,u.bits);if(0==d.have){a.msg="invalid bit length repeat";d.mode=29;break}r=d.lens[d.have-1];u=3+B(e,2);w(e,2)}else if(17==u.val){if(!g(e,u.bits+3))break a;w(e,u.bits);r=0;u=3+B(e,3);w(e,3)}else{if(!g(e,u.bits+7))break a;w(e,u.bits);r=0;u=11+B(e,7);w(e,7)}if(d.have+u>d.nlen+d.ndist){a.msg=
896 "invalid bit length repeat";d.mode=29;break}for(;u--;)d.lens[d.have++]=r}}if(29==d.mode)break;if(0==d.lens[256]){a.msg="invalid code -- missing end-of-block";d.mode=29;break}d.next=0;d.lencode=d.next;d.lenbits=9;if(O=b(d,1)){a.msg="invalid literal/lengths set";d.mode=29;break}d.distcode=d.next;d.distbits=6;if(O=b(d,2)){a.msg="invalid distances set";d.mode=29;break}d.mode=19;if(c==ZLIB.Z_TREES)break a;case 19:d.mode=20;case 20:if(6<=e.have&&258<=e.left){l(e);u=a;var L=N=r=void 0,Y=void 0,K=void 0,
897 ea=void 0,V=void 0,I=void 0,aa=void 0,ba=void 0,W=void 0,G=void 0,F=void 0,S=void 0,Z=void 0,ca=void 0,fa=void 0,ga=void 0,T=void 0,M=void 0,X=void 0,ha=void 0,da=-1,T=-1,r=u.state,N=u.input_data,L=u.next_in,Y=L+u.avail_in-5,K=u.next_out,ea=K-(k-u.avail_out),V=K+(u.avail_out-257),I=r.wsize,aa=r.whave,ba=r.wnext,W=r.window,G=r.hold,F=r.bits,S=r.codes,Z=r.lencode,ca=r.distcode,fa=(1<<r.lenbits)-1,ga=(1<<r.distbits)-1;b:do c:for(15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,
898 F+=8),T=S[Z+(G&fa)];;){M=T.bits;G>>>=M;F-=M;M=T.op;if(0==M)u.output_data+=String.fromCharCode(T.val),K++;else if(M&16){X=T.val;if(M&=15)F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8),X+=G&(1<<M)-1,G>>>=M,F-=M;15>F&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,G+=(N.charCodeAt(L++)&255)<<F,F+=8);T=S[ca+(G&ga)];d:for(;;){M=T.bits;G>>>=M;F-=M;M=T.op;if(M&16){ha=T.val;M&=15;F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8,F<M&&(G+=(N.charCodeAt(L++)&255)<<F,F+=8));ha+=G&(1<<M)-1;G>>>=M;F-=M;M=K-ea;if(ha>M){M=ha-M;if(M>aa&&
899 r.sane){u.msg="invalid distance too far back";r.mode=29;break b}da=0;T=-1;da=0==ba?da+(I-M):da+(ba-M);M<X&&(X-=M,u.output_data+=W.substring(da,da+M),K+=M,da=-1,T=K-ha)}else da=-1,T=K-ha;if(0<=da)u.output_data+=W.substring(da,da+X),K+=X;else{M=X;M>K-T&&(M=K-T);u.output_data+=u.output_data.substring(T,T+M);K+=M;X-=M;T+=M;for(K+=X;2<X;)u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),u.output_data+=u.output_data.charAt(T++),X-=3;X&&(u.output_data+=u.output_data.charAt(T++),
900 1<X&&(u.output_data+=u.output_data.charAt(T++)))}}else if(0==(M&64)){T=S[ca+(T.val+(G&(1<<M)-1))];continue d}else{u.msg="invalid distance code";r.mode=29;break b}break d}}else if(0==(M&64)){T=S[Z+(T.val+(G&(1<<M)-1))];continue c}else{M&32?r.mode=11:(u.msg="invalid literal/length code",r.mode=29);break b}break c}while(L<Y&&K<V);X=F>>>3;L-=X;F-=X<<3;G&=(1<<F)-1;u.next_in=L;u.next_out=K;u.avail_in=L<Y?5+(Y-L):5-(L-Y);u.avail_out=K<V?257+(V-K):257-(K-V);r.hold=G;r.bits=F;n(a,e);11==d.mode&&(d.back=-1);
898 -break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!h(e,d.extra))break a;
899 -d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!q(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!q(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!h(e,d.extra))break a;
901 +break}for(d.back=0;;){u=d.codes[d.lencode+B(e,d.lenbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(u.op&&0==(u.op&240)){for(r=u;;){u=d.codes[d.lencode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;d.length=u.val;if(0==u.op){d.mode=25;break}if(u.op&32){d.back=-1;d.mode=11;break}if(u.op&64){a.msg="invalid literal/length code";d.mode=29;break}d.extra=u.op&15;d.mode=21;case 21:if(d.extra){if(!g(e,d.extra))break a;
902 +d.length+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.was=d.length;d.mode=22;case 22:for(;;){u=d.codes[d.distcode+B(e,d.distbits)];if(u.bits<=e.bits)break;if(!p(e))break a}if(0==(u.op&240)){for(r=u;;){u=d.codes[d.distcode+r.val+(B(e,r.bits+r.op)>>>r.bits)];if(r.bits+u.bits<=e.bits)break;if(!p(e))break a}w(e,r.bits);d.back+=r.bits}w(e,u.bits);d.back+=u.bits;if(u.op&64){a.msg="invalid distance code";d.mode=29;break}d.offset=u.val;d.extra=u.op&15;d.mode=23;case 23:if(d.extra){if(!g(e,d.extra))break a;
903 d.offset+=B(e,d.extra);w(e,d.extra);d.back+=d.extra}d.mode=24;case 24:if(0==e.left)break a;u=k-e.left;if(d.offset>u){u=d.offset-u;if(u>d.whave&&d.sane){a.msg="invalid distance too far back";d.mode=29;break}u>d.wnext?(u-=d.wnext,r=d.wsize-u):r=d.wnext-u;N=-1;u>d.length&&(u=d.length)}else r=-1,N=a.next_out-d.offset,u=d.length;u>e.left&&(u=e.left);e.left-=u;d.length-=u;if(0<=r)a.output_data+=d.window.substring(r,r+u),a.next_out+=u;else{a.next_out+=u;do a.output_data+=a.output_data.charAt(N++);while(--u)}0==
901 -d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!h(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}p(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!h(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
902 -d.mode=29;break}p(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
903 -e.wnext=e.whave<e.wsize?e.whave:0;g-=a.avail_in;k-=a.avail_out;a.total_in+=g;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==g&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
904 +d.length&&(d.mode=20);break;case 25:if(0==e.left)break a;a.output_data+=String.fromCharCode(d.length);a.next_out++;e.left--;d.mode=20;break;case 26:if(d.wrap){if(!g(e,32))break a;k-=e.left;a.total_out+=k;d.total+=k;k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,a.output_data.length-k,k));k=e.left;if((d.flags?e.hold:m(e.hold))!=d.check){a.msg="incorrect data check";d.mode=29;break}q(e)}d.mode=27;case 27:if(d.wrap&&d.flags){if(!g(e,32))break a;if(e.hold!=(d.total&4294967295)){a.msg="incorrect length check";
905 +d.mode=29;break}q(e)}d.mode=28;case 28:O=ZLIB.Z_STREAM_END;break a;case 29:O=ZLIB.Z_DATA_ERROR;break a;case 30:return ZLIB.Z_MEM_ERROR;default:return ZLIB.Z_STREAM_ERROR}l(e);if(d.wsize||k!=a.avail_out&&29>d.mode&&(26>d.mode||c!=ZLIB.Z_FINISH))e=a.state,u=a.output_data.length,null===e.window&&(e.window=""),0==e.wsize&&(e.wsize=1<<e.wbits),e.window=u>=e.wsize?a.output_data.substring(u-e.wsize):e.whave+u<e.wsize?e.window+a.output_data:e.window.substring(e.whave-(e.wsize-u))+a.output_data,e.whave=e.window.length,
906 +e.wnext=e.whave<e.wsize?e.whave:0;h-=a.avail_in;k-=a.avail_out;a.total_in+=h;a.total_out+=k;d.total+=k;d.wrap&&k&&(a.adler=d.check=a.checksum_function(d.check,a.output_data,0,a.output_data.length));a.data_type=d.bits+(d.last?64:0)+(11==d.mode?128:0)+(19==d.mode||14==d.mode?256:0);(0==h&&0==k||c==ZLIB.Z_FINISH)&&O==ZLIB.Z_OK&&(O=ZLIB.Z_BUF_ERROR);return O};ZLIB.inflateEnd=function(a){if(!a||!a.state)return ZLIB.Z_STREAM_ERROR;a.state.window=null;a.state=null;return ZLIB.Z_OK};ZLIB.z_stream.prototype.inflate=
907 function(b,c){var d,e;this.input_data=b;this.next_in=a(c,"next_in",0);this.avail_in=a(c,"avail_in",b.length-this.next_in);d=a(c,"flush",ZLIB.Z_SYNC_FLUSH);e=a(c,"avail_out",-1);var g="";do{this.avail_out=0<=e?e:16384;this.output_data="";this.next_out=0;this.error=ZLIB.inflate(this,d);if(0<=e)return this.output_data;g+=this.output_data;if(0<this.avail_out)break}while(this.error==ZLIB.Z_OK);return g};ZLIB.z_stream.prototype.inflateReset=function(a){return ZLIB.inflateReset(this,a)}})();
908 "undefined"===typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js");
909 (function(){function b(a,b,c,v){var n,l;n=a>>>16&65535;a&=65535;if(1==v)return a+=b.charCodeAt(c)&255,65521<=a&&(a-=65521),n+=a,65521<=n&&(n-=65521),a|n<<16;if(null===b)return 1;if(16>v){for(;v--;)a+=b.charCodeAt(c++)&255,n+=a;65521<=a&&(a-=65521);return a|n%65521<<16}for(;5552<=v;){v-=5552;l=347;do a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&255,n+=a,a+=b.charCodeAt(c++)&
@@ -916,16 +919,16 @@ a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=b[c++],n+=a,a+=
919 1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,
920 1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(b,c,v,n){if("string"===typeof c){if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=
921 a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,b=a[(b^c.charCodeAt(v++))&255]^b>>>8,n-=8;if(n){do b=a[(b^c.charCodeAt(v++))&255]^b>>>8;while(--n)}c=b^4294967295}return c}if(null==c)c=0;else{for(b^=4294967295;8<=n;)b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&
919 -255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,p,q;if(0>=v)return a;p=Array(32);q=Array(32);q[0]=3988292384;for(n=l=1;32>n;n++)q[n]=l,l<<=1;c(p,q);c(q,p);do{c(p,q);v&1&&(a=b(p,a));v>>=1;if(0==v)break;c(q,p);v&1&&(a=b(q,a));v>>=1}while(0!=v);return a^e}})();
920 -var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,p=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
921 -b.chrome?c():setTimeout(c,500)},q=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(h){n(h)}}},h=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=h(n));var g=this;k=n.type;var u=!1,w,B,y=function(){q(g,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
922 -new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));g.readyState=g.DONE;y()};a.readAsDataURL(n);g.readyState=g.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);g.readyState=g.DONE;y();p(w)}},A=function(a){return function(){if(g.readyState!==g.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},x;g.readyState=g.INIT;m||(m="download");if(a)w=
923 -(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);y();p(w);g.readyState=g.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(x=n.slice||n.webkitSlice,n=x.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
924 -function(b){B.location.href=a.toURL();g.readyState=g.DONE;q(g,"writeend",b);p(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=g["on"+a]});b.write(n);g.abort=function(){b.abort();g.readyState=g.DONE};g.readyState=g.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
925 -b,c){c||(a=h(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;q(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
922 +255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,b=a[(b^c[v++])&255]^b>>>8,n-=8;if(n){do b=a[(b^c[v++])&255]^b>>>8;while(--n)}c=b^4294967295}return c};ZLIB.crc32_combine=function(a,e,v){var n,l,q,p;if(0>=v)return a;q=Array(32);p=Array(32);p[0]=3988292384;for(n=l=1;32>n;n++)p[n]=l,l<<=1;c(q,p);c(p,q);do{c(q,p);v&1&&(a=b(q,a));v>>=1;if(0==v)break;c(p,q);v&1&&(a=b(p,a));v>>=1}while(0!=v);return a^e}})();
923 +var saveAs=saveAs||function(b){if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var c=b.document.createElementNS("http://www.w3.org/1999/xhtml","a"),a="download"in c,d=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),e=b.webkitRequestFileSystem,v=b.requestFileSystem||e||b.mozRequestFileSystem,n=function(a){(b.setImmediate||b.setTimeout)(function(){throw a;},0)},l=0,q=function(a){var c=function(){"string"===typeof a?(b.URL||b.webkitURL||b).revokeObjectURL(a):a.remove()};
924 +b.chrome?c():setTimeout(c,500)},p=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"===typeof e)try{e.call(a,c||a)}catch(g){n(g)}}},g=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\ufeff",a],{type:a.type}):a},B=function(n,m,k){k||(n=g(n));var h=this;k=n.type;var u=!1,w,B,x=function(){p(h,["writestart","progress","write","writeend"])},z=function(){if(B&&d&&"undefined"!==typeof FileReader){var a=
925 +new FileReader;a.onloadend=function(){var b=a.result;B.location.href="data:attachment/file"+b.slice(b.search(/[,;]/));h.readyState=h.DONE;x()};a.readAsDataURL(n);h.readyState=h.INIT}else{if(u||!w)w=(b.URL||b.webkitURL||b).createObjectURL(n);B?B.location.href=w:void 0==b.open(w,"_blank")&&d&&(b.location.href=w);h.readyState=h.DONE;x();q(w)}},A=function(a){return function(){if(h.readyState!==h.DONE)return a.apply(this,arguments)}},R={create:!0,exclusive:!1},y;h.readyState=h.INIT;m||(m="download");if(a)w=
926 +(b.URL||b.webkitURL||b).createObjectURL(n),c.href=w,c.download=m,setTimeout(function(){var a=new MouseEvent("click");c.dispatchEvent(a);x();q(w);h.readyState=h.DONE});else{b.chrome&&k&&"application/octet-stream"!==k&&(y=n.slice||n.webkitSlice,n=y.call(n,0,n.size,"application/octet-stream"),u=!0);e&&"download"!==m&&(m+=".download");if("application/octet-stream"===k||e)B=b;v?(l+=n.size,v(b.TEMPORARY,l,A(function(a){a.root.getDirectory("saved",R,A(function(a){var b=function(){a.getFile(m,R,A(function(a){a.createWriter(A(function(b){b.onwriteend=
927 +function(b){B.location.href=a.toURL();h.readyState=h.DONE;p(h,"writeend",b);q(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&z()};["writestart","progress","write","abort"].forEach(function(a){b["on"+a]=h["on"+a]});b.write(n);h.abort=function(){b.abort();h.readyState=h.DONE};h.readyState=h.WRITING}),z)}),z)};a.getFile(m,{create:!1},A(function(a){a.remove();b()}),A(function(a){a.code===a.NOT_FOUND_ERR?b():z()}))}),z)}),z)):z()}},w=B.prototype;if("undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob)return function(a,
928 +b,c){c||(a=g(a));return navigator.msSaveOrOpenBlob(a,b||"download")};w.abort=function(){this.readyState=this.DONE;p(this,"abort")};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return function(a,b,c){return new B(a,b,c)}}}("undefined"!==typeof self&&self||"undefined"!==typeof window&&window||this.content);
929 "undefined"!==typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
927 -var version="0.9.1",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
928 -null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Loading...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimation:!1},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
930 +var version="0.9.3",urlvars={},amtstack,wsstack=null,AllWsman="AMT_8021xCredentialContext AMT_8021XProfile AMT_ActiveFilterStatistics AMT_AgentPresenceCapabilities AMT_AgentPresenceInterfacePolicy AMT_AgentPresenceService AMT_AgentPresenceWatchdog AMT_AgentPresenceWatchdogAction AMT_AlarmClockService IPS_AlarmClockOccurrence AMT_AssetTable AMT_AssetTableService AMT_AuditLog AMT_AuditPolicyRule AMT_AuthorizationService AMT_BootCapabilities AMT_BootSettingData AMT_ComplexFilterEntryBase AMT_CRL AMT_CryptographicCapabilities AMT_EACCredentialContext AMT_EndpointAccessControlService AMT_EnvironmentDetectionInterfacePolicy AMT_EnvironmentDetectionSettingData AMT_EthernetPortSettings AMT_EventLogEntry AMT_EventManagerService AMT_EventSubscriber AMT_FilterEntryBase AMT_FilterInSystemDefensePolicy AMT_GeneralSettings AMT_GeneralSystemDefenseCapabilities AMT_Hdr8021Filter AMT_HeuristicPacketFilterInterfacePolicy AMT_HeuristicPacketFilterSettings AMT_HeuristicPacketFilterStatistics AMT_InterfacePolicy AMT_IPHeadersFilter AMT_KerberosSettingData AMT_ManagementPresenceRemoteSAP AMT_MessageLog AMT_MPSUsernamePassword AMT_NetworkFilter AMT_NetworkPortDefaultSystemDefensePolicy AMT_NetworkPortSystemDefenseCapabilities AMT_NetworkPortSystemDefensePolicy AMT_PCIDevice AMT_PETCapabilities AMT_PETFilterForTarget AMT_PETFilterSetting AMT_ProvisioningCertificateHash AMT_PublicKeyCertificate AMT_PublicKeyManagementCapabilities AMT_PublicKeyManagementService AMT_PublicPrivateKeyPair AMT_RedirectionService AMT_RemoteAccessCapabilities AMT_RemoteAccessCredentialContext AMT_RemoteAccessPolicyAppliesToMPS AMT_RemoteAccessPolicyRule AMT_RemoteAccessService AMT_SetupAndConfigurationService AMT_SNMPEventSubscriber AMT_StateTransitionCondition AMT_SystemDefensePolicy AMT_SystemDefensePolicyInService AMT_SystemDefenseService AMT_SystemPowerScheme AMT_ThirdPartyDataStorageAdministrationService AMT_ThirdPartyDataStorageService AMT_TimeSynchronizationService AMT_TLSCredentialContext AMT_TLSProtocolEndpoint AMT_TLSProtocolEndpointCollection AMT_TLSSettingData AMT_TrapTargetForService AMT_UserInitiatedConnectionService AMT_WebUIService AMT_WiFiPortConfigurationService CIM_AbstractIndicationSubscription CIM_Account CIM_AccountManagementCapabilities CIM_AccountManagementService CIM_AccountOnSystem CIM_AdminDomain CIM_AlertIndication CIM_AssignedIdentity CIM_AssociatedPowerManagementService CIM_AuthenticationService CIM_AuthorizationService CIM_Battery CIM_BIOSElement CIM_BIOSFeature CIM_BIOSFeatureBIOSElements CIM_BootConfigSetting CIM_BootService CIM_BootSettingData CIM_BootSourceSetting CIM_Capabilities CIM_Card CIM_Chassis CIM_Chip CIM_Collection CIM_Component CIM_ComputerSystem CIM_ComputerSystemPackage CIM_ConcreteComponent CIM_ConcreteDependency CIM_Controller CIM_CoolingDevice CIM_Credential CIM_CredentialContext CIM_CredentialManagementService CIM_Dependency CIM_DeviceSAPImplementation CIM_ElementCapabilities CIM_ElementConformsToProfile CIM_ElementLocation CIM_ElementSettingData CIM_ElementSoftwareIdentity CIM_ElementStatisticalData CIM_EnabledLogicalElement CIM_EnabledLogicalElementCapabilities CIM_EthernetPort CIM_Fan CIM_FilterCollection CIM_FilterCollectionSubscription CIM_HostedAccessPoint CIM_HostedDependency CIM_HostedService CIM_Identity CIM_IEEE8021xCapabilities CIM_IEEE8021xSettings CIM_Indication CIM_IndicationService CIM_InstalledSoftwareIdentity CIM_KVMRedirectionSAP CIM_LANEndpoint CIM_ListenerDestination CIM_ListenerDestinationWSManagement CIM_Location CIM_Log CIM_LogEntry CIM_LogicalDevice CIM_LogicalElement CIM_LogicalPort CIM_LogicalPortCapabilities CIM_LogManagesRecord CIM_ManagedCredential CIM_ManagedElement CIM_ManagedSystemElement CIM_MediaAccessDevice CIM_MemberOfCollection CIM_Memory CIM_MessageLog CIM_NetworkPort CIM_NetworkPortCapabilities CIM_NetworkPortConfigurationService CIM_OrderedComponent CIM_OwningCollectionElement CIM_OwningJobElement CIM_PCIController CIM_PhysicalComponent CIM_PhysicalElement CIM_PhysicalElementLocation CIM_PhysicalFrame CIM_PhysicalMemory CIM_PhysicalPackage CIM_Policy CIM_PolicyAction CIM_PolicyCondition CIM_PolicyInSystem CIM_PolicyRule CIM_PolicyRuleInSystem CIM_PolicySet CIM_PolicySetAppliesToElement CIM_PolicySetInSystem CIM_PowerManagementCapabilities CIM_PowerManagementService CIM_PowerSupply CIM_Privilege CIM_PrivilegeManagementCapabilities CIM_PrivilegeManagementService CIM_ProcessIndication CIM_Processor CIM_ProtocolEndpoint CIM_ProvidesServiceToElement CIM_Realizes CIM_RecordForLog CIM_RecordLog CIM_RedirectionService CIM_ReferencedProfile CIM_RegisteredProfile CIM_RemoteAccessAvailableToElement CIM_RemoteIdentity CIM_RemotePort CIM_RemoteServiceAccessPoint CIM_Role CIM_RoleBasedAuthorizationService CIM_RoleBasedManagementCapabilities CIM_RoleLimitedToTarget CIM_SAPAvailableForElement CIM_SecurityService CIM_Sensor CIM_Service CIM_ServiceAccessBySAP CIM_ServiceAccessPoint CIM_ServiceAffectsElement CIM_ServiceAvailableToElement CIM_ServiceSAPDependency CIM_ServiceServiceDependency CIM_SettingData CIM_SharedCredential CIM_SoftwareElement CIM_SoftwareFeature CIM_SoftwareFeatureSoftwareElements CIM_SoftwareIdentity CIM_StatisticalData CIM_StorageExtent CIM_System CIM_SystemBIOS CIM_SystemComponent CIM_SystemDevice CIM_SystemPackaging CIM_UseOfLog CIM_Watchdog CIM_WiFiEndpoint CIM_WiFiEndpointCapabilities CIM_WiFiEndpointSettings CIM_WiFiPort CIM_WiFiPortCapabilities IPS_AdminProvisioningRecord IPS_ClientProvisioningRecord IPS_HostBasedSetupService IPS_HostIPSettings IPS_HTTPProxyService IPS_HTTPProxyAccessPoint IPS_IderSessionUsingPort IPS_IPv6PortSettings IPS_KVMRedirectionSettingData IPS_KvmSessionUsingPort IPS_ManualProvisioningRecord IPS_OptInService IPS_PowerManagementService IPS_ProvisioningAuditRecord IPS_ProvisioningRecordLog IPS_RasSessionUsingPort IPS_ScreenConfigurationService IPS_ScreenSettingData IPS_SecIOService IPS_SessionUsingPort IPS_SolSessionUsingPort IPS_TLSProvisioningRecord IPS_WatchDogAction".split(" "),disconnecturl=
931 +null,terminal,currentView=0,LoadingHtml="<div style=text-align:center;padding-top:20px>Loading...<div>",amtversion=0,amtversionmin=0,amtFirstPull=0,amtwirelessif=-1,desktop,desktopsettings={encflags:1,showfocus:!1,showmouse:!0,showcad:!0,limitFrameRate:!1,noMouseRotate:!1,decimationMode:2},currentMeshNode=null,webcompilerfeatures="AgentPresence Alarms AuditLog Certificates ComputerSelectorToolbar Desktop DesktopInband DesktopInbandFiles Desktop-Multi DesktopRotation Desktop-Settings DesktopType EventLog EventSubscriptions FileSaver HardwareInfo IDER IDERDebug IDERStats Inflate Look-MeshCentral Mode-MeshCentral2 NetworkSettings PowerControl PowerControl-Advanced RemoteAccess Storage SystemDefense Terminal Terminal-Enumation-All Terminal-FxEnumation-All TerminalSize VersionWarning Wireless WsmanBrowser".split(" "),
932 StatusStrs=["Disconnected","Connecting...","Setup...","Connected"],t,t2,rsepass=null;
933 function startup(){var b=document.getElementsByTagName("input");for(t=0;t<b.length;t++)b[t].id&&(window[b[t].id]=b[t]);urlvars=getUrlVars();for(var c in AllWsman)b=document.createElement("option"),b.text=AllWsman[c],b.id="WSB-"+AllWsman[c],Q(22).add(b);desktop=CreateAmtRedirect(CreateAmtRemoteDesktop("Desk",Q(8)));desktop.onStateChanged=onDesktopStateChange;QE("c10",!0);try{t=localStorage.getItem("desktopsettings")}catch(a){}t&&(desktopsettings=JSON.parse(t));
934 applyDesktopSettings();terminal=CreateAmtRedirect(CreateAmtRemoteTerminal("Term"));terminal.onStateChanged=onTerminalStateChange;Q(33).value=terminalEmulations[terminal.m.terminalEmulation];Q(30).value="\r\n"==terminal.m.lineFeed?"CR+LF":"LF";QE("c4",!0);Q("p13").addEventListener("dragover",haltEvent,!1);Q("p13").addEventListener("dragleave",haltEvent,!1);Q("p13").addEventListener("drop",terminal_FileSelectHandler,!1);document.addEventListener("dragover",
@@ -958,14 +961,14 @@ function syncClockEx(){amtstack.AMT_TimeSynchronizationService_GetLowAccuracyTim
961 function updateSystemStatus(){if(amtsysstate&&!(99<currentView)){var b=0,c,a,d=TableStart(),e="",v=amtsysstate.AMT_GeneralSettings.response,n="<i>Unknown</i>";null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(n=DMTFPowerStates[amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState],9<amtversion&&"Power on"==n&&amtsysstate.IPS_PowerManagementService&&amtsysstate.IPS_PowerManagementService.response&&
962 3==amtsysstate.IPS_PowerManagementService.response.OSPowerSavingState&&(n="Standby (Connected)"),QH(28,n),QH(39,n));v.PowerSource&&(n+=[", Plugged-in",", On Battery"][v.PowerSource]);d+=TableEntry("Power",addLink(n,"showPowerActionDlg()"));c=v.HostName;a=v.DomainName;null!=a&&0<a.length&&(c+="."+a);c=0==c.length?"<i>None</i>":EscapeHtml(c);d+=TableEntry("Name & Domain",addLinkConditional(c,"showEditNameDlg()",xxAccountAdminName));amtstack.amtauth&&amtstack.amtauth.uuidStr?d+=
963 TableEntry("System ID",amtstack.amtauth.uuidStr):HardwareInventory&&(d+=TableEntry("System ID",guidToStr(HardwareInventory.CIM_ComputerSystemPackage.response.PlatformGUID.toLowerCase())));if(amtlogicalelements){var n="",l=getItem(amtlogicalelements,"CreationClassName","AMT_SetupAndConfigurationService");2==l.ProvisioningState&&5<amtversion&&(n=" activated in Admin Control Mode (ACM)",4==l.ProvisioningMode&&(n=" activated in Client Control Mode (CCM)",b=9));d+=TableEntry("Intel&reg; ME","v"+getItem(amtlogicalelements,
961 -"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var p=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
962 -q=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),h=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),h=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
963 -p&&(e+=", Redirection Port");q&&(e+=", Serial-over-LAN");n&&(e+=", IDE-Redirect");h&&(e+=", KVM");""==e&&(e=" None");d+=TableEntry("Active Features",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Primary display",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Primary display","Secondary display",
964 +"InstanceID","AMT").VersionString+n)}null!=amtsysstate.CIM_ServiceAvailableToElement&&null!=amtsysstate.CIM_ServiceAvailableToElement.responses&&0<amtsysstate.CIM_ServiceAvailableToElement.responses.length&&(QV(27,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState),QV(38,2!=amtsysstate.CIM_ServiceAvailableToElement.responses[0].PowerState));if(200==amtsysstate.AMT_RedirectionService.status){var q=amtfeatures[0]=1==amtsysstate.AMT_RedirectionService.response.ListenerEnabled,
965 +p=amtfeatures[1]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&2),n=amtfeatures[2]=0!=(amtsysstate.AMT_RedirectionService.response.EnabledState&1),g=amtfeatures[3]=void 0;5<amtversion&&null!=amtsysstate.CIM_KVMRedirectionSAP&&(QV("go14",!0),g=amtfeatures[3]=6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState&&2==amtsysstate.CIM_KVMRedirectionSAP.response.RequestedState||2==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState||6==amtsysstate.CIM_KVMRedirectionSAP.response.EnabledState);
966 +q&&(e+=", Redirection Port");p&&(e+=", Serial-over-LAN");n&&(e+=", IDE-Redirect");g&&(e+=", KVM");""==e&&(e=" None");d+=TableEntry("Active Features",addLinkConditional(e.substring(2),"showFeaturesDlg()",xxAccountAdminName))}null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response&&(n=amtsysstate.IPS_KVMRedirectionSettingData.response,e="Primary display",7<amtversion&&void 0!==n.DefaultScreen&&255>n.DefaultScreen&&(e=["Primary display","Secondary display",
967 "3rd display"][n.DefaultScreen]),e='<span title="'+format("The default remote display is {0}",e.toLowerCase())+'">'+e+"</span>",1==n.Is5900PortEnabled&&(e+=", Port 5900 enabled"),1==n.OptInPolicy&&(e+=", "+n.OptInPolicyTimeout+" "+(0<n.OptInPolicyTimeout?"seconds opt-in":"second opt-in")),e+=", "+n.SessionTimeout+" minute"+(0<n.SessionTimeout?"s":"")+" session timeout",9<amtversion&&null!=amtsysstate.IPS_ScreenConfigurationService?((n=0!=(amtsysstate.IPS_ScreenConfigurationService.response.EnabledState&
965 -1))&&(e+=", Blanking Allowed"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Remote Desktop",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!p||!q);QV(26,xxAccountAdminName);QV(36,!p||!h);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Unknown state",p=amtsysstate.IPS_OptInService.response.OptInRequired,
966 -0==p&&(e="Not Required"),1==p&&(e="Required for KVM only"),4294967295==p&&(e="Always Required"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("User Consent",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Unknown",1:"Other",2:"Enabled",3:"Disabled",4:"Shutting Down",5:"Not Applicable",6:"Enabled but Offline",7:"In Test",
968 +1))&&(e+=", Blanking Allowed"),QV(45,n),Q(46).checked=!1):QV(45,!1),d+=TableEntry("Remote Desktop",addLinkConditional(e,"showDesktopSettingsDlg()",xxAccountAdminName)));QV(25,!q||!p);QV(26,xxAccountAdminName);QV(36,!q||!g);QV(37,xxAccountAdminName);5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&(e="Unknown state",q=amtsysstate.IPS_OptInService.response.OptInRequired,
969 +0==q&&(e="Not Required"),1==q&&(e="Required for KVM only"),4294967295==q&&(e="Always Required"),1==amtsysstate.IPS_OptInService.response.CanModifyOptInPolicy&&(e=addLinkConditional(e,"showConsentDlg()",xxAccountAdminName)),d+=TableEntry("User Consent",e));1==amtstack.wsman.comm.xtls&&null!=amtsysstate.CIM_BootService&&null!=amtsysstate.CIM_BootService.response.EnabledState&&(e={0:"Unknown",1:"Other",2:"Enabled",3:"Disabled",4:"Shutting Down",5:"Not Applicable",6:"Enabled but Offline",7:"In Test",
970 8:"Deferred",9:"Quiesce",10:"Starting",32768:"OCR Disabled",32769:"OCR Enabled",32770:"OCR Disabled, RPE Enabled",32771:"RPE & OCR Enabled"},15<amtversion&&(e[32768]="OCR & RPE Disabled",e[32769]="OCR Enabled, RPE Disabled"),n=e[amtsysstate.CIM_BootService.response.EnabledState]?e[amtsysstate.CIM_BootService.response.EnabledState]:"Unknown",d+=TableEntry("Boot Features",addLinkConditional(n,"showEnableBootServiceDlg()",xxAccountAdminName)));if(null!=AmtSystemPowerSchemes)for(var e=amtsysstate.CIM_ElementSettingData.responses,
968 -B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(p=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,q=0;q<AmtSystemPowerSchemes.length;q++)AmtSystemPowerSchemes[q].SchemeGUID==p&&(d+=TableEntry("Power Policy",addLinkConditional(AmtSystemPowerSchemes[q].Description.split(":")[1],'showPowerPolicyDlg("'+p+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Date & Time",
971 +B=0;B<e.length;B++)if(e[B].SettingData&&1==e[B].IsCurrent&&"http://intel.com/wbem/wscim/1/amt-schema/1/AMT_SystemPowerScheme"==e[B].SettingData.ReferenceParameters.ResourceURI)for(q=e[B].SettingData.ReferenceParameters.SelectorSet.Selector[1].Value,p=0;p<AmtSystemPowerSchemes.length;p++)AmtSystemPowerSchemes[p].SchemeGUID==q&&(d+=TableEntry("Power Policy",addLinkConditional(AmtSystemPowerSchemes[p].Description.split(":")[1],'showPowerPolicyDlg("'+q+'")',xxAccountAdminName)));amtdeltatime&&(d+=TableEntry("Date & Time",
972 addLinkConditional((new Date((new Date).getTime()+amtdeltatime)).toLocaleString(),"syncClock()",xxAccountAdminName)));e=AddRefreshButton("PullSystemStatus()")+" ";e+=AddButton("Power Actions...","showPowerActionDlg()")+" ";e+=AddButton("Save State...","saveEntireAmtState()")+" ";d+=TableEnd(e);amtstack.amtauth&&(d+="<div style=position:absolute;top:10px;right:20px;cursor:pointer onclick=showAuthCsme()><img src=authcsme.png width=100 height=100 /></div>");QH(15,d);d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+
973 TableEnd("<div>&nbsp;"+AddRefreshButton("PullSystemStatus(1)")+" Changing network settings may cause this page to becaume unavailable.");d=d+"<br><h2>General Settings</h2>"+TableStart();e="";"<i>None</i>"!=c&&(1==v.SharedFQDN&&(e=", shared with OS"),0==v.SharedFQDN&&(e=", different from OS"));d+=TableEntry("Name & Domain",addLinkConditional(c+e,"showEditNameDlg(1)",xxAccountAdminName));c="Disabled";1==v.DDNSUpdateEnabled?c="Enabled each "+v.DDNSPeriodicUpdateInterval+" minutes, TTL is "+v.DDNSTTL+
974 " minutes":1==v.DDNSUpdateByDHCPServerEnabled&&(c="Update by DHCP server");d+=TableEntry("Dynamic DNS",addLinkConditional(c,"showEditDnsDlg()",xxAccountAdminName));d+=TableEnd();for(a in amtsysstate.AMT_EthernetPortSettings.responses){c=amtsysstate.AMT_EthernetPortSettings.responses[a];if(c.WLANLinkProtectionLevel||1==a)amtwirelessif=a;if(0!=a||amtwirelessif==a||"00-00-00-00-00-00"!=c.MACAddress){0==a&&b++;d+="<br><h2>"+(amtwirelessif==a?"Wireless Interface":"Wired Interface")+"</h2>";d+=TableStart();
@@ -974,8 +977,8 @@ d+=TableEntry("Link state",1==c.LinkIsUp?"Link is up":"Link is down");if(c.LinkP
977 "number"==typeof xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled&&(d+=TableEntry("Local WIFI Profile Sync",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.localProfileSynchronizationEnabled?"Enabled":"Disabled","showWifiSyncDlg("+a+")",xxAccountAdminName))),d=null!=xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&1==xxWireless.AMT_BootCapabilities.response.UEFIWiFiCoExistenceAndProfileShare&&null!=xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?
978 d+TableEntry("UEFI WiFi CoEx Profile sharing",addLinkConditional(1==xxWireless.AMT_WiFiPortConfigurationService.response.UEFIWiFiProfileShareEnabled?"Enabled":"Disabled","showUefiWifiCoExDlg()",xxAccountAdminName)):d+TableEntry("UEFI WiFi CoEx Profile sharing","Unavailable"));amtwirelessif!=a&&(d+=TableEntry("Respond to ping",addLinkConditional(["Disabled","ICMP response","RMCP response","ICMP & RMCP response"][v.PingResponseEnabled+(v.RmcpPingResponseEnabled<<1)],"showPingActionDlg()",xxAccountAdminName)),
979 e=1==c.DHCPEnabled?"Automatic using DHCP server":"Static IP address",1==c.IpSyncEnabled&&(e+=", IP sync with OS"),d+=TableEntry("IPv4 state",addLinkConditional(e,"showIPSetupDlg()",xxAccountAdminName)));d+=TableEntry("IPv4 address",isIpAddress(c.IPAddress,"None"));isIpAddress(c.DefaultGateway)&&(d+=TableEntry("IPv4 gateway / Mask",c.DefaultGateway+" / "+isIpAddress(c.SubnetMask,"None")));e=c.PrimaryDNS;isIpAddress(e)&&(c.SecondaryDNS&&(e+=" / "+c.SecondaryDNS),d+=TableEntry("IPv4 domain name server",
977 -e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var p="Disabled",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(p=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Enabled, Automatic & manual addresses":
978 -"Enabled, Automatic addresses");d+=TableEntry("IPv6 state",addLinkConditional(p,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=", "),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6 address",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6 address",
980 +e));if(200==amtsysstate.IPS_IPv6PortSettings.status&&5<amtversion){c=amtsysstate.IPS_IPv6PortSettings.responses[a];for(var q="Disabled",w,e=amtsysstate.CIM_ElementSettingData.responses,B=0;B<e.length;B++)e[B].SettingData&&e[B].SettingData.ReferenceParameters.SelectorSet.Selector.Value=="Intel(r) IPS IPv6 Settings "+a&&(w=1==e[B].IsCurrent);1==w&&(q=(e=isIpAddress(c.IPv6Address)||isIpAddress(c.DefaultRouter)||isIpAddress(c.PrimaryDNS)||isIpAddress(c.SecondaryDNS))?"Enabled, Automatic & manual addresses":
981 +"Enabled, Automatic addresses");d+=TableEntry("IPv6 state",addLinkConditional(q,"showIPv6StateDlg("+a+","+w+")",xxAccountAdminName));if(1==w){if(c.CurrentAddressInfo&&0<c.CurrentAddressInfo.length){c.CurrentAddressInfo=MakeToArray(c.CurrentAddressInfo);ipv6addr="";for(B=0;B<c.CurrentAddressInfo.length;B++)0<ipv6addr.length&&(ipv6addr+=", "),ipv6addr+=c.CurrentAddressInfo[B].split(",")[0];d+=TableEntry("IPv6 address",addLink(ipv6addr,"showIPv6AddrDlg("+a+',"'+c.CurrentAddressInfo+'")'))}else d+=TableEntry("IPv6 address",
982 "None");isIpAddress(c.CurrentDefaultRouter)&&(d+=TableEntry("IPv6 default router",c.CurrentDefaultRouter));isIpAddress(c.CurrentPrimaryDNS)&&(e=c.CurrentPrimaryDNS,isIpAddress(c.CurrentSecondaryDNS)&&(e+=" / "+c.CurrentSecondaryDNS),d+=TableEntry("IPv6 domain name server",e))}}d+=TableEnd()}}1!=urlvars.kvmonly&&0==fullscreenonly&&(-1!=amtwirelessif&&0==(amtFirstPull&2)&&PullWireless(),QH(19,d),1==b&&0==(amtFirstPull&4)&&PullSystemDefense(),0==(amtFirstPull&8)&&(11<amtversion||
983 11==amtversion&&5<amtversionmin)&&PullStorage());0==currentView&&go(1,1)}}function isIpAddress(b,c){return b&&null!=b&&0<b.length&&"::"!=b&&"::0"!=b?b:c}
984 function showLinkPolicyDlg(b){if(!xxdialogMode){var c=amtsysstate.AMT_EthernetPortSettings.responses[b],a;a=""+("<label><input type=checkbox id=d11p1 value=1 "+(0<=c.LinkPolicy.indexOf(1)?"checked":"")+">Available in S0/AC - Powered on & plugged in</label><br>");a+="<label><input type=checkbox id=d11p2 value=14 "+(0<=c.LinkPolicy.indexOf(14)?"checked":"")+">Available in Sx/AC - Sleeping & plugged in</label><br>";a+="<label><input type=checkbox id=d11p3 value=16 "+(0<=c.LinkPolicy.indexOf(16)?"checked":
@@ -1022,8 +1025,8 @@ function newSubscriptionButtonOk(){var b=0==Q("subuser").value.length?void 0:Q("
1025 function PullAuditLog(b){1==b&&xxdialogMode||(amtFirstPull|=32,amtstack.Enum("AMT_AuditLog",processAuditLog0))}var auditLog=null,auditLogEnabledStates="Unknown;Other;Enabled;Disabled;Shutting Down;Not Applicable;Enabled but Offline;In Test;Deferred;Quiesce;Starting".split(";");
1026 function processAuditLog0(b,c,a,d){200==d&&(QV("go15",!0),c=a[0].AuditState,b=c&1?"Disabled":"Enabled",c&2&&(b+=", Locked"),c&4&&(b+=", Almost Full"),c&8&&(b+=", Full"),c&16&&(b+=", NoKey"),c="<h1>Audit Log Settings</h1>"+TableStart(),c+=TableEntry("State",b),c+=TableEntry("Storage",a[0].CurrentNumberOfRecords+" record(s), "+a[0].PercentageFree+"% free"),c+=TableEntry("Overwrite policy",2==a[0].OverwritePolicy?"Wraps when full":"Never overwrites"),c+=TableEnd(),QH(49,c),amtstack.GetAuditLog(processAuditLog1))}
1027 function processAuditLog1(b,c){auditLog=c;var a,d;d="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px>"+(TableEnd('<div style=float:right><input id=auditFilter placeholder="Filter" style=margin:4px onkeyup=auditFilter()>&nbsp;</div><div> '+AddRefreshButton("PullAuditLog(1)")+AddButton("Save...","SaveAuditLog()")+AddButton("Clear Log","ClearAuditLog()"))+"<br>");if(0==c.length)d="No audit log events found.";else{var e=0;d+="<table class=log1 cellpadding=0 cellspacing=0 style=width:100%;border-radius:8px><tr><td width=80px><p><td><td><td><tr><td class=r1 style=width:110px>&nbsp;&nbsp;<b>Time</b><td class=r1 style=width:260px><b>Initiator</b><td class=r1><b>Action</b>";
1025 -for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var p="";0<v.NetAddress.length&&(p=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=", "+v.Event);null!=v.ExStr&&(n+=", "+v.ExStr);""!=l&&""!=p&&(l+=", ");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",
1026 -{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+p+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT Audit Log",auditLog)}
1028 +for(a in c){var v=c[a],n=v.AuditApp,l=v.Initiator;e++;var q="";0<v.NetAddress.length&&(q=v.NetAddress.replace("0000:0000:0000:0000:0000:0000:0000:0001","::1"));v.Event&&(n+=", "+v.Event);null!=v.ExStr&&(n+=", "+v.ExStr);""!=l&&""!=q&&(l+=", ");d+="<tr id=xamtaudit"+a+" class=r3 onclick=showAuditDetails("+a+')><td class=r1 title="'+v.Time.toLocaleString()+'">&nbsp;&nbsp;'+v.Time.toLocaleDateString("en",{year:"numeric",month:"2-digit",day:"numeric"})+"<br>&nbsp;&nbsp;"+v.Time.toLocaleTimeString("en",
1029 +{hour:"2-digit",minute:"2-digit",second:"2-digit"})+"<td class=r1>"+l+q+"<td class=r1>"+n}d+=TableEnd(0==e?"&nbsp;":"")+"<br>"}QH(50,d)}function auditFilter(){var b=Q("auditFilter").value.toLowerCase(),c;for(c in auditLog)QV("xamtaudit"+c,""==b||0<=JSON.stringify(auditLog[c]).toLowerCase().indexOf(b))}function SaveAuditLog(){xxdialogMode||null==auditLog||SaveJsonFile("IntelAmtAuditlog","auditevents","Intel AMT Audit Log",auditLog)}
1030 function ClearAuditLog(b){QH(60,"Clear audit log?");setDialogMode(1,"Audit Log",3,ClearAuditLogEx)}function ClearAuditLogEx(){var b=amtstack.AMT_AuditLog_SetAuditLock(1,0,b,function(){amtstack.AMT_AuditLog_ClearLog(function(){amtstack.AMT_AuditLog_SetAuditLock(0,2,b,function(){setTimeout(PullAuditLog,1E3)})})})}function ShowAuditLogSettings(){xxdialogMode||amtstack.AMT_AuditLog_RequestStateChange(2,0,AuditLogSettingsCompleted)}
1031 function AuditLogSettingsCompleted(b,c,a,d){200==d?PullAuditLog():messagebox("Audit Log","Error: "+d)}
1032 function showAuditDetails(b){if(!xxdialogMode){var c,a=auditLog[b],d;d="<div style=text-align:left>"+addHtmlValue("Time",a.Time.toLocaleString());""!=a.Initiator&&(d+=addHtmlValue("Initiator",a.Initiator));""!=a.NetAddress&&(d+=addHtmlValue("Address",a.NetAddress));d+=addHtmlValue("Application",a.AuditApp);d+=addHtmlValue("Event",a.Event);if(null!=a.ExStr)d+=addHtmlValue("Extended Data",a.ExStr);else if(0<a.Ex.length){var e="";for(c in a.Ex)0<e.length&&(e+=","),e+=a.Ex.charCodeAt(c);""!=e&&(d+=addHtmlValue("Data Values",
@@ -1164,7 +1167,7 @@ v&&(n+="Disabled, ");var l=0;for(c in a.Realms)""!=amtstack.RealmNames[a.Realms[
1167 "newAccountButton()"));b+="<br><td class=r1>"+TableEnd(c+"</div>");QH(21,b)}}function toggleAccountButton(){showHiddenAccounts=!showHiddenAccounts;updateAccounts()}function removeUserAclEntryResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}function changeAccountStateButton(b,c,a){haltEvent(b);xxdialogMode||amtstack.AMT_AuthorizationService_SetAclEnabledState(c,1==a?!1:!0,setAclEnabledStateResponse,c)}
1168 function changeAccountButton(b,c){haltEvent(b);xxdialogMode||(updateRealms(xxAccountRealmInfo[c].Realms),d2username.value=xxAccountRealmInfo[c].DigestUsername?xxAccountRealmInfo[c].DigestUsername:GetSidString(atob(xxAccountRealmInfo[c].KerberosUserSid)),d2password1.value=d2password2.value="",d2permission.value=xxAccountRealmInfo[c].AccessPermission,setDialogMode(2,"Edit Account",-1==c?3:7,function(a){changeAccountButtonEx(c,a)}),updateAccountDialog())}
1169 function newAccountButton(){xxdialogMode||(updateRealms([]),d2username.value=d2password1.value=d2password2.value="",d2permission.value=2,setDialogMode(2,"New Account",3,function(){changeAccountButtonEx(null,1)}),updateAccountDialog())}
1167 -function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Account Error","Invalid Parameters");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var p in amtstack.RealmNames)(amtstack.RealmNames[p]||3==p)&&Q("rx"+p).checked&&a.push(p);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1170 +function changeAccountButtonEx(b,c){if(1==c){var a=[],d=d2username.value,e=d2permission.value,v=d2password1.value,n=GetSidByteArray(Q("d2username").value),l=null;if(0==d.length||v!=d2password2.value){messagebox("Account Error","Invalid Parameters");return}null==n?l=window.btoa(rstr_md5(d+":"+amtsysstate.AMT_GeneralSettings.response.DigestRealm+":"+v)):(d=null,n=btoa(n));if(-1!=b)for(var q in amtstack.RealmNames)(amtstack.RealmNames[q]||3==q)&&Q("rx"+q).checked&&a.push(q);null==b?amtstack.AMT_AuthorizationService_AddUserAclEntryEx(d,
1171 l,n,e,a,userAclEntryExResponse):-1==b?amtstack.AMT_AuthorizationService_SetAdminAclEntryEx(d,l,userAclEntryExResponse):amtstack.AMT_AuthorizationService_UpdateUserAclEntryEx(b,d,l,n,e,a,userAclEntryExResponse)}2==c&&amtstack.AMT_AuthorizationService_RemoveUserAclEntry(b,removeUserAclEntryResponse)}function userAclEntryExResponse(b,c,a,d,e){methodcheck(a)||PullUserInfo()}
1172 function updateRealms(b){QV(61,null!=b);if(null!=b){var c="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx3"+(0<=b.indexOf(3)?" checked":"")+">Administrator</label></li><hr />",a;for(a in amtstack.RealmNames){var d="";0<=b.indexOf(parseInt(a))&&(d=" checked");amtstack.RealmNames[a]&&(c+="<li><label><input type=checkbox onchange=updateAccountDialog() id=rx"+a+d+">"+amtstack.RealmNames[a]+"</label></li>")}QH(62,c)}}
1173 function updateAccountDialog(){var b=!0;if("none"!=Q(61).style.display){var b=!1,c;for(c in amtstack.RealmNames)(amtstack.RealmNames[c]||3==c)&&Q("rx"+c).checked&&(b=!0)}b&&(b=0<d2username.value.length&&passwordcheck(d2password1.value)&&d2password1.value==d2password2.value);QE("c54",b)}var xxUserPermissions=["Local only","Network only","All (Local & Network)"];
@@ -1182,8 +1185,8 @@ c3.value="Start Capture"}}function terminal_FileSelectHandler(b){haltEvent(b);if
1185 function webRtcDesktopReset(){if(null!=webRtcDesktop){null!=webRtcDesktop.softdesktop&&(webRtcDesktop.softdesktop.Stop(),webRtcDesktop.softdesktop=null);if(null!=webRtcDesktop.webchannel){try{webRtcDesktop.webchannel.close()}catch(b){}webRtcDesktop.webchannel=null}if(null!=webRtcDesktop.webrtc){try{webRtcDesktop.webrtc.close()}catch(b){}webRtcDesktop.webrtc=null}webRtcDesktop=null;desktop.m.hold(!1);updateDesktopState();p24files=null;p24downloadFileCancel();p24uploadFileCancel();QV("go24",!1);24==
1186 currentView&&go(14)}}function connectDesktopButton(b){desktop.disconnectCode=0;connectDesktop(b)}var connectDesktopConsent=!1;
1187 function connectDesktop(b){desktop&&!xxdialogMode&&(connectDesktopConsent=!1,0==desktop.State?!0!==b&&5<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_OptInService&&void 0!=amtsysstate.IPS_OptInService.response&&4294967295==amtsysstate.IPS_OptInService.response.OptInRequired?(connectDesktopConsent=!0,amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):(desktop.m.useRLE=0!=(desktopsettings.encflags&1),desktop.m.bpp=desktopsettings.encflags&2?2:1,15<amtversion&&null!=amtsysstate&&null!=
1185 -amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimation=
1186 -amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes&&desktopsettings.decimation):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimation=!1),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1188 +amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(desktop.m.lowcolor=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&16),desktop.m.graymode=amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&0!=(desktopsettings.encflags&4),desktop.m.useZLib=amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&0!=(desktopsettings.encflags&8),desktop.m.decimationMode=
1189 +0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes?desktopsettings.decimationMode:0):(desktop.m.lowcolor=!1,desktop.m.graymode=!1,desktop.m.useZLib=!1,desktop.m.decimationMode=0),desktop.m.showmouse=desktopsettings.showmouse,desktop.m.onScreenSizeChange=center,desktop.m.onKvmData=function(b){var a=null;try{a=JSON.parse(b)}catch(d){}null!=a&&null!=a.action&&("restart"==a.action?(webRtcDesktopReset(),desktop.m.sendKvmData(JSON.stringify({action:"present",ver:1}))):"present"==
1190 a.action&&null==webRtcDesktop?(webRtcDesktop={platform:a.platform},"undefined"!==typeof RTCPeerConnection?webRtcDesktop.webrtc=new RTCPeerConnection(null):"undefined"!==typeof webkitRTCPeerConnection&&(webRtcDesktop.webrtc=new webkitRTCPeerConnection(null)),webRtcDesktop.webchannel=webRtcDesktop.webrtc.createDataChannel("DataChannel",{}),webRtcDesktop.webchannel.onopen=function(){urlvars&&urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Open");desktop.m.hold(!0);webRtcDesktop.webRtcActive=!0;
1191 webRtcDesktop.softdesktop=CreateKvmDataChannel(webRtcDesktop.webchannel,CreateAgentRemoteDesktop("Desk",Q(8)),desktop.m);webRtcDesktop.softdesktop.m.setRotation(desktop.m.rotation);desktopsettings.quality&&(webRtcDesktop.softdesktop.m.CompressionLevel=desktopsettings.quality);desktopsettings.scaling&&(webRtcDesktop.softdesktop.m.ScalingLevel=desktopsettings.scaling);webRtcDesktop.softdesktop.Start();updateDesktopState();QV("go24",!0);downloadFile=null;p24files=webRtcDesktop.softdesktop;
1192 p24targetpath="";webRtcDesktop.softdesktop.onControlMsg=onFilesControlData;webRtcDesktop.softdesktop.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:""}))},webRtcDesktop.webchannel.onclose=function(a){urlvars.kvmdatatrace&&console.log("WebRTC Data Channel Closed");webRtcDesktopReset()},webRtcDesktop.webrtc.onicecandidate=function(a){null==a.candidate?desktop.m.sendKvmData(JSON.stringify({action:"offer",ver:1,sdp:webRtcDesktop.webrtcoffer.sdp})):webRtcDesktop.webrtcoffer.sdp+="a="+a.candidate.candidate+
@@ -1194,14 +1197,15 @@ function ProcessDesktopDisplayInfo(b,c,a,d){200!=d?desktopScreenInfo=null:(deskt
1197 function UpdateDesktopDisplayInfo(){for(var b="",c=0,a=0;3>a;a++)1==desktopScreenInfo.IsActive[a]&&(c++,b+='<input type="button" '+(a==desktopScreenInfo.KVMRSD.DefaultScreen?'style="background-color:DodgerBlue"':"")+' value="'+(a+1)+'" title="Switch to screen '+(a+1)+'" onkeypress="return false" onkeydown="return false" onclick="desktopSwitchScreen('+a+')">&nbsp;');1<c?Q(42).innerHTML=b+"&nbsp;":Q(42).innerHTML=""}
1198 function desktopSwitchScreen(b){var c=Clone(desktopScreenInfo.KVMRSD);c.DefaultScreen=b;amtstack.Put("IPS_KVMRedirectionSettingData",c,desktopSwitchScreenEx)}function desktopSwitchScreenEx(b,c,a,d){200==d&&(desktopScreenInfo.KVMRSD=a.Body,UpdateDesktopDisplayInfo())}
1199 function onDesktopStateChange(b,c){var a=!1;c10.value=0==c?"Connect":"Disconnect";var d=3==c&&!urlvars.kvmviewonly;QE(43,d);QE("deskkeys",d);QE("DeskWD",d);QE(44,d);switch(c){case 0:webRtcDesktopReset();QV("deskRecordIcon",!1);2==b.disconnectCode?messagebox("Remote Desktop","The remote device is busy, a session may already be open."):3==b.disconnectCode?messagebox("Remote Desktop","The device indicated that this type of connection of not supported."):5E4==b.disconnectCode?
1197 -messagebox("Remote Desktop","KVM disconnection, they may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode&&(a=!0);break;case 3:12<=amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1198 -function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&1==desktop.m.kvmExt.compression&&(b+=", Compressed"));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged))}
1200 +messagebox("Remote Desktop","KVM disconnection, this may indicate that Intel AMT is unable to capture the display (Try RLE8 encoding), or unsupported GPU."):50001==b.disconnectCode?(a=null!=b.connectTime&&b.connectTime+5E3<Date.now(),console.log(b.disconnectCode,a)):50002==b.disconnectCode&&messagebox("Remote Desktop","KVM disconnection that may be due to the display size and resolution being too large for the Intel AMT KVM buffer. Try RLE8 encoding or reducing the display resolution.");break;case 3:12<=
1201 +amtversion&&b.m.sendKvmData(JSON.stringify({action:"present",ver:1})),1==b.serverIsRecording&&QV("deskRecordIcon",!0)}center();updateDesktopState();a&&setTimeout(connectDesktop,200)}
1202 +function updateDesktopState(){var b="";3==desktop.State&&(webRtcDesktop&&1==webRtcDesktop.webRtcActive?b=", Soft-KVM":desktop.m&&desktop.m.kvmExt&&(1==desktop.m.kvmExt.decimationState&&(b+=", Downscaled"),1==desktop.m.kvmExt.compression&&(b+=", Compressed")));Q(40).textContent=StatusStrs[desktop.State]+b}function showDesktopSettings(){xxdialogMode||(applyDesktopSettings(),setDialogMode(7,"Remote Desktop Settings",3,showDesktopSettingsChanged))}
1203 function showDesktopSettingsChanged(){desktopsettings.encflags=parseInt(c11.value);desktopsettings.showmouse=d7showcursor.checked;desktopsettings.showcad=d7showcad.checked;desktopsettings.limitFrameRate=d7limitFrameRate.checked;desktopsettings.noMouseRotate=d7noMouseRotate.checked;desktopsettings.quality=d7bitmapquality.value;desktopsettings.scaling=d7bitmapscaling.value;try{localStorage.setItem("desktopsettings",JSON.stringify(desktopsettings))}catch(b){}applyDesktopSettings();desktop.m.frameRateDelay=
1204 1==desktopsettings.limitFrameRate?200:0;0!=desktop.State&&(desktop.disconnectCode=0,desktop.Stop(),setTimeout(connectDesktop,800))}
1201 -function applyDesktopSettings(){d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&
1202 -amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",
1203 -amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):
1204 -(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1205 +function applyDesktopSettings(){d7decimation.value=desktopsettings.decimationMode;d7showcursor.checked=desktopsettings.showmouse;d7showcad.checked=desktopsettings.showcad;d7limitFrameRate.checked=desktopsettings.limitFrameRate;d7noMouseRotate.checked=desktopsettings.noMouseRotate;desktopsettings.quality&&(d7bitmapquality.value=desktopsettings.quality);desktopsettings.scaling&&(d7bitmapscaling.value=desktopsettings.scaling);QV("d7softkvmsettings",12<=amtversion);var b=desktopsettings.encflags,c="";
1206 +15<amtversion&&null!=amtsysstate&&null!=amtsysstate.IPS_KVMRedirectionSettingData&&amtsysstate.IPS_KVMRedirectionSettingData.response?(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported||(b&=11),amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported||(b&=23),amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm1" value=21>RLE4G, 16 Grays</option><option id="d7exm2" value=5>RLE8G, 256 Grays</option>'),
1207 +c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",amtsysstate.IPS_KVMRedirectionSettingData.response.ZlibControlSupported&&(amtsysstate.IPS_KVMRedirectionSettingData.response.GrayscalePixelFormatSupported&&(c+='<option id="d7exm3" value=29>ZRLE4G, Compressed Gray</option>',c+='<option id="d7exm4" value=13>ZRLE8G, Compressed Gray</option>'),c+='<option id="d7exm5" value=9>ZRLE8, Compressed Color</option>',c+='<option id="d7exm6" value=11>ZRLE16, Compressed Color</option>'),
1208 +QV("d7decimationspan",0<amtsysstate.IPS_KVMRedirectionSettingData.response.InitialDecimationModeForLowRes)):(b&=3,c+="<option value=1>RLE8, 256 Colors</option>",c+="<option value=3>RLE16, 64k Colors</option>",QV("d7decimationspan",!1));c+="<option value=0>RAW8, 256 Colors</option>";c+="<option value=2>RAW16, 16k Colors</option>";QH("c11",c);c11.value=b;QV(43,desktopsettings.showcad)}var fullscreen=!1,fullscreenonly=!1;
1209 function deskToggleFull(b){xxdialogMode||(1==fullscreenonly?(console.log("deskToggleFull1",fullscreenonly,urlvars.kvmonly),fullscreenonly=!1,1==urlvars.kvmonly?console.log("deskToggleFull2"):disconnect()):(fullscreenonly=b,fullscreen=!fullscreen,QV(7,!fullscreen),QV(35,!fullscreen),QV("c5",!fullscreen),QV("c9",fullscreen),fullscreen?(QS(8).left=0,QS(14).padding=0):(QS(8).left="156px",QS(14).padding=
1210 "8px"),center()))}function deskShowTypeDialog(){xxdialogMode||3!=desktop.State||(Q(44).blur(),setDialogMode(11,"Remote Keyboard Entry",3,showDeskTypeEx,'<div>Enter text and click OK to remotely type it using a US english keyboard. Make sure to place the remote cursor at the correct position before proceeding.<div><textarea id=d2typeText style="margin-top:5px;width:100%;height:184px;resize:none" maxlength=2000></textarea>'),Q("d2typeText").focus())}
1211 var AmtDeskTypeTimer=null,AmtDeskTypeContent=null,DeskTypeTranslate={39:222,42:106,43:107,44:188,45:189,46:190,47:191,59:186,61:187,91:219,92:220,93:221,96:192,191:111},DeskTypeShiftTranslate={33:49,34:222,35:51,36:52,37:53,38:55,40:57,41:48,58:186,60:188,62:190,63:191,64:50,94:54,95:189,106:56,107:187,123:219,124:220,125:221,126:192};
@@ -1211,13 +1215,13 @@ var deskkeysset={0:[[65511,1],[65511,0]],1:[[65511,1],[65364,1],[65364,0],[65511
1215 function deskSendKeys(){if(!Q(48).checked){var b=Q("deskkeys").value;if(null!=b&&null!=deskkeysset[b]&&0!=desktop.State)for(var c=0;c<deskkeysset[b].length;c++)desktop.m.sendkey(deskkeysset[b][c][0],deskkeysset[b][c][1])}}
1216 function deskSaveImage(){if(!(xxdialogMode||3!=desktop.State||urlvars&&urlvars.norecord)){var b="Desktop",c=new Date;amtsysstate&&(b+="-"+amtsysstate.AMT_GeneralSettings.response.HostName);b+="-"+c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2)+"-"+("0"+c.getHours()).slice(-2)+"-"+("0"+c.getMinutes()).slice(-2);Q("Desk").toBlob(function(a){saveAs(a,b+".jpg")})}}
1217 function dmousedown(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousedown(b),desktop.m.sendKeepAlive()):desktop.m.mousedown(b))}function dmouseup(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mouseup(b),desktop.m.sendKeepAlive()):desktop.m.mouseup(b))}
1214 -function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||null==webRtcDesktop||null==webRtcDesktop.softdesktop||(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive())}
1218 +function dmousemove(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousemove(b),desktop.m.sendKeepAlive()):desktop.m.mousemove(b))}function dmousewheel(b){xxdialogMode||Q(48).checked||(null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop?(webRtcDesktop.softdesktop.m.mousewheel(b),desktop.m.sendKeepAlive()):desktop.m.mousewheel(b))}
1219 function drotate(b){xxdialogMode||(b=desktop.m.rotation+b,desktop.m.setRotation(b),null!=webRtcDesktop&&null!=webRtcDesktop.softdesktop&&null!=webRtcDesktop.softdesktop.m&&webRtcDesktop.softdesktop.m.setRotation(b),center())}var p24files=null,p24filetree=null,p24targetpath=null,p24filetreelocation=[];
1220 function onFilesControlData(b){if(0<b.length&&123!=b.charCodeAt(0))p24gotDownloadBinaryData(b);else if(b=JSON.parse(b),"download"==b.action)p24gotDownloadCommand(b);else if("upload"==b.action)p24gotUploadData(b);else if("pong"!=b.action)if(b.path=b.path.replace(/\//g,"\\"),null!=p24filetree&&b.path==p24filetree.path){var c=p24getCheckedNames();p24filetree=b;p24updateFiles(c)}else{for(var c=b.path.split("/").join("\\"),a=p24targetpath.split("/").join("\\");0<c.length&&"\\"==c[0];)c=c.substring(1);
1221 for(;0<a.length&&"\\"==a[0];)a=a.substring(1);if(c==a||"\\"==b.path&&""==p24targetpath)p24filetree=b,p24updateFiles()}}function p24getCheckedNames(){for(var b=[],c=document.getElementsByName("fd"),a=0;a<c.length;a++)c[a].checked&&b.push(p24filetree.dir[c[a].value].n);return b}
1218 -function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Root</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],p=l.n,q;q=70<p.length?'<span title="'+EscapeHtml(p)+'">'+EscapeHtml(p.substring(0,
1219 -70))+"...</span>":EscapeHtml(p);var p=EscapeHtml(p),h="";null!=l.d&&(h=new Date(l.d),h=h.getMonth()+1+"/"+h.getDate()+"/"+h.getFullYear()+" "+h.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1220 -encodeURIComponent(l.nx)+'")>'+q+"</a></span></div>":(w=q,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+p)+'","'+encodeURIComponent(p)+'",'+l.s+")'>"+q+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+h+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1222 +function p24updateFiles(b){var c="",a="",d="<a style=cursor:pointer onclick=p24folderup(0)>Root</a>",e=p24filetree.path.split("\\");p24filetreelocation=[];for(var v in e)""!=e[v]&&p24filetreelocation.push(e[v]);for(v in p24filetreelocation)d+=" / <a style=cursor:pointer onclick=p24folderup("+(parseInt(v)+1)+")>"+p24filetreelocation[v]+"</a>";var e=p24filetreelocation.join("/"),n=p24sort_files(p24filetree.dir);for(v in n){var l=n[v],q=l.n,p;p=70<q.length?'<span title="'+EscapeHtml(q)+'">'+EscapeHtml(q.substring(0,
1223 +70))+"...</span>":EscapeHtml(q);var q=EscapeHtml(q),g="";null!=l.d&&(g=new Date(l.d),g=g.getMonth()+1+"/"+g.getDate()+"/"+g.getFullYear()+" "+g.toLocaleTimeString()+"&nbsp;");var B="";null!=l.s&&(B=getFileSizeStr(l.s));var w="";3>l.t?w='<div class=filelist file=999><input file=999 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span style=float:right title=""></span><span><div class=fileIcon'+l.t+'></div><a style=cursor:pointer onclick=p24folderset("'+
1224 +encodeURIComponent(l.nx)+'")>'+p+"</a></span></div>":(w=p,0<l.s&&(w='<a rel="noreferrer noopener" target="_blank" style=cursor:pointer onclick=\'p24downloadfile("'+encodeURIComponent(e+"/"+q)+'","'+encodeURIComponent(q)+'",'+l.s+")'>"+p+"</a>"),w='<div class=filelist file=3><input file=3 style=float:left name=fd class=fcb type=checkbox onchange=p24setActions() value="'+l.nx+'">&nbsp;<span class=fsize>'+g+"</span><span style=float:right>"+B+"</span><span><div class=fileIcon"+l.t+"></div>"+w+"</span></div>");
1225 3>l.t?c+=w:a+=w}QH("p24files",c+a);QH("p24currentpath",d);QE("p24FolderUp",0!=p24filetreelocation.length);if(null!=b)for(c=document.getElementsByName("fd"),v=0;v<c.length;v++)0<=b.indexOf(p24filetree.dir[c[v].value].n)&&(c[v].checked=!0);p24setActions()}function p24folderset(b){p24targetpath=joinPaths(p24filetree.path,p24filetree.dir[b].n).split("\\").join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}
1226 function p24folderup(b){if(null==b)p24filetreelocation.pop();else for(;p24filetreelocation.length>b;)p24filetreelocation.pop();p24targetpath=p24filetreelocation.join("/");p24files.sendCtrlMsg(JSON.stringify({action:"ls",reqid:1,path:p24targetpath}))}var p24sortorder;function p24sort_filename(b,c){return b.ln>c.ln?1*p24sortorder:b.ln<c.ln?-1*p24sortorder:0}function p24sort_timestamp(b,c){return b.d>c.d?1*p24sortorder:b.d<c.d?-1*p24sortorder:0}
1227 function p24sort_bysize(b,c){return b.s==c.s?p24sort_filename(b,c):(b.s-c.s)*p24sortorder}function p24sort_files(b){var c=[],a=Q("p24sortdropdown").value,d;for(d in b)b[d].nx=d,null==b[d].s&&(b[d].s=0),null==b[d].n&&(b[d].n=d),b[d].ln=b[d].n.toLowerCase(),c.push(b[d]);p24sortorder=1;3<a&&(p24sortorder=-1,a-=3);1==a?c.sort(p24sort_filename):2==a?c.sort(p24sort_bysize):3==a&&c.sort(p24sort_timestamp);return c}
@@ -1337,10 +1341,9 @@ function powerActionResponse00(b,c,a,d){if(200==d){b=3;try{b=2==amtsysstate.CIM_
1341 d))}
1342 function powerActionDlgCheck(){AmtOcrPba=null;AmtOcrPbaLength=0;var b=d5actionSelect.value;500==b||501==b?amtstack.RequestOSPowerStateChange(501==b?3:2,function(b,a,d,e){200==e?QH(60,"Power action completed."):QH(60,format("Power action error #{0}.",e));setDialogMode(1,"Power Action",0);setTimeout(function(){setDialogMode(0)},1300)}):104==b||105==b?(b="Confirm execution of Intel&reg; Remote Secure Erase?<br>Enter Secure Erase password if required.<br><br><div style=height:16px><input type=password id=rsepass maxlength=32 style=float:right;width:240px><div>Password</div></div><br><div style=color:red><b>WARNING:</b> This will wipe data on the remote system.</div>",rsepass=
1343 1,setDialogMode(11,"Power Actions",3,powerActionDlg,b)):106==b||107==b?powerActionDlgRPE():powerActionDlg()}
1340 -function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>WARNING:</b> This will wipe data on the remote system.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&2&&a.push("<label><input id=rpef1 type=checkbox onchange=powerActionDlgRPEValidate()>Pyrite Revert</label>");d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");
1341 -d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",
1342 -a.join("<br />")));c+="<div id=rpepsid style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("Pyrite PSID","<input id=rpepsidx style=width:210px maxlength=64 type=input>")+"</div>";c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password","<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Power Actions",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}
1343 -function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[1,2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpepsid",b&2);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1344 +function powerActionDlgRPE(b){var c;c="Confirm execution of Intel&reg; Remote Platform Erase?<br><br><div style=color:red><b>WARNING:</b> This will wipe data on the remote system.</div>";var a=[],d=amtPowerBootCapabilities.PlatformErase;d&4&&a.push("<label><input id=rpef2 type=checkbox onchange=powerActionDlgRPEValidate()>Secure Erase All SSDs</label>");d&64&&a.push("<label><input id=rpef6 type=checkbox onchange=powerActionDlgRPEValidate()>TPM Clear</label>");d&33554432&&a.push("<label><input id=rpef25 type=checkbox onchange=powerActionDlgRPEValidate()>Clear BIOS NVM Variables</label>");
1345 +d&67108864&&a.push("<label><input id=rpef26 type=checkbox onchange=powerActionDlgRPEValidate()>BIOS Reload of Golden Configuration</label>");d&-2147483648&&a.push("<label><input id=rpef31 type=checkbox onchange=powerActionDlgRPEValidate()>CSME Unconfigure</label>");1<a.length&&(c+=format("<br />Select the actions to take:<br /><br /><div style=margin-left:16px>{0}</div><br />",a.join("<br />")));c+="<div id=rpessdpass style=margin-top:4px;margin-bottom:4px;display:none>"+addHtmlValue("SSD Master Password",
1346 +"<input id=rpessdpassx style=width:210px maxlength=64 type=input>")+"</div>";setDialogMode(11,"Power Actions",3,powerActionDlgRPEEx,c,b);QE("c54",!1)}function powerActionDlgRPEValidate(){var b=0,c=amtPowerBootCapabilities.PlatformErase,a=[2,6,25,26,31],d;for(d in a)c&1<<a[d]&&Q("rpef"+a[d]).checked&&(b+=1<<a[d]);QV("rpessdpass",b&4);QE("c54",b)}var platfromEraseTLV=null;
1347 function powerActionDlgRPEEx(b,c){var a=0,d=amtPowerBootCapabilities.PlatformErase,e=[1,2,6,25,26,31],v;for(v in e)d&1<<e[v]&&Q("rpef"+e[v]).checked&&(a+=1<<e[v]);d=makeUefiBootParam(1,a,4);e=1;a&2&&(d+=makeUefiBootParam(10,Q("rpepsidx").value),e++);a&4&&(d+=makeUefiBootParam(20,Q("rpessdpassx").value),e++);platfromEraseTLV={tlv:btoa(d),tlvlen:e};c?(statusbox("Power Action","Checking state..."),amtstack.Get("IPS_OptInService",powerActionResponse0,0,1)):powerActionDlg()}
1348 function powerActionDlg(){var b=d5actionSelect.value;if(999==b)showAdvPowerDlg();else if(998==b)amtstack.Get("IPS_OptInService",powerActionResponse0,0,1);else{10>b&&2<b&&null==urlvars.noredirdisconnect&&(3==desktop.State&&connectDesktop(),3==terminal.State&&connectTerminal(),void 0!=ider&&3==ider.state&&iderStop());statusbox("Power Action","Checking state...");null!=rsepass&&1===rsepass&&(rsepass=Q("rsepass").value);var c=!0;6>amtversion&&(c=!1);13==currentView&&8==b&&(c=!1);13!=currentView&&10>=
1349 b&&(c=!1);c?amtstack.Get("IPS_OptInService",powerActionResponse0,0,1):amtstack.Get("AMT_BootSettingData",powerActionResponse1,0,1)}}var AvdPowerDlg;
@@ -1374,10 +1377,10 @@ targetPowerAction=b;11==b&&(b=10);999>b?(console.log("RequestPowerStateChange("+
1377 function consentChanged(){QE("c54",6==d6ConsentText.value.length)}function changeConsentDisplay(){xxchangeConsentDisplay=!0;checkConsentDisplay()}function checkConsentDisplay(){amtstack.Get("IPS_SecIOService",checkConsentDisplayResponse1)}var xxchangeConsentDisplay=!1;
1378 function checkConsentDisplayResponse1(b,c,a,d){200==d&&(a.Body.DefaultScreen&&(a.Body.DefaultScreen=parseInt(a.Body.DefaultScreen)),a.Body.NumberOfScreens&&(a.Body.NumberOfScreens=parseInt(a.Body.NumberOfScreens)),1==xxchangeConsentDisplay?(xxchangeConsentDisplay=!1,a.Body.DefaultScreen=d6Display.value,amtstack.Put("IPS_SecIOService",a.Body,checkConsentDisplayResponse1)):(d6Display.value=a.Body.DefaultScreen,QV("d6ThirdDisplay",2<a.Body.NumberOfScreens)))}
1379 var xxStorage=null,xxStorageVendors=[],xxStorageApplications=[];function PullStorage(){amtFirstPull|=8;wsstack.comm.PerformAjax("",PullStorageResponse,null,0,"/amt-storage/","GET")}
1377 -function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(E){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1378 -b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Manage Intel&reg; AMT storage for this computer.<br><br>";var v,n,e="";for(c in b){var l=0,p;for(p in b[c]){l++;var q=0,h;for(h in b[c][p]){q++;if(c!=v||p!=n)""!=e&&(a+=e,e="<br>"),v=c,n=p,e=""!=c?e+EscapeHtml(c+" / "+p):e+
1379 -"Root";var B='"'+c+(""!=c?"/":"")+p+(""!=p?"/":"")+h+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+p+'","'+h+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Download","DownloadFromStorage("+B+',"'+h+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(h)+"</b>, <i>"+b[c][p][h].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(p)&&xxStorageApplications.push(p)}0==q&&(wsstack.comm.PerformAjax("",
1380 -function(){},null,0,"/amt-storage/"+c+"/"+p,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>No files found.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(E){console.log(E)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Upload...","UploadToStorage()"):
1380 +function PullStorageResponse(b,c,a){0==amtstack.PendingBatchOperations&&refreshButtons(!0);if(200==c){QV("go21",!0);for(c=0;32>c;c++){do a=b.length,b=b.replace(String.fromCharCode(c),"");while(a>b.length)}try{xxStorage=JSON.parse(b)}catch(D){return}xxStorageVendors=[];xxStorageApplications=[];b=xxStorage.content;if(Array.isArray(b)){a={};for(c in b){var d=b[c].vendor?b[c].vendor:"";a[d]||(a[d]={});var e=b[c].app?b[c].app:"";a[d][e]||(a[d][e]={});b[c].name&&(a[d][e][b[c].name]=b[c])}xxStorage.content=
1381 +b=a}else{if(b["index.htm"]||b["logon.htm"])b[""]={"":{}};b["index.htm"]&&(b[""][""]["index.htm"]=b["index.htm"],delete b["index.htm"]);b["logon.htm"]&&(b[""][""]["logon.htm"]=b["logon.htm"],delete b["logon.htm"])}d=0;a=TableStart2()+"<tr><td class=r1 style=padding-left:15px><br>Manage Intel&reg; AMT storage for this computer.<br><br>";var v,n,e="";for(c in b){var l=0,q;for(q in b[c]){l++;var p=0,g;for(g in b[c][q]){p++;if(c!=v||q!=n)""!=e&&(a+=e,e="<br>"),v=c,n=q,e=""!=c?e+EscapeHtml(c+" / "+q):e+
1382 +"Root";var B='"'+c+(""!=c?"/":"")+q+(""!=q?"/":"")+g+'"',e=e+('<div class=itemBar onclick=showStorageDetails("'+c+'","'+q+'","'+g+'",'+B+")><div style=float:right>"),e=e+(" "+AddButton2("Download","DownloadFromStorage("+B+',"'+g+'",event)')),e=e+("</div><div style=padding-top:3px><b>"+EscapeHtml(g)+"</b>, <i>"+b[c][q][g].size+" bytes</i></div></div>");d++;-1==xxStorageVendors.indexOf(c)&&xxStorageVendors.push(c);-1==xxStorageApplications.indexOf(q)&&xxStorageApplications.push(q)}0==p&&(wsstack.comm.PerformAjax("",
1383 +function(){},null,0,"/amt-storage/"+c+"/"+q,"DELETE"),wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE"))}0==l&&wsstack.comm.PerformAjax("",function(){},null,0,"/amt-storage/"+c,"DELETE")}""!=e&&(a+=e);0==d&&(a+="<div style=padding-left:15px><br><i>No files found.</i></div><br>");v=!1;try{var w=new FileReader;v=null!=w&&null!=w.readAsBinaryString}catch(D){console.log(D)}a+="<br><td class=r1>"+TableEnd(AddRefreshButton("PullStorage()")+(v?AddButton("Upload...","UploadToStorage()"):
1384 ""));QH(55,a)}else QH(55,"Unable to load storage data...<br/>"+AddButton("Refresh","PullStorage()"))}function showStorageDetails(b,c,a,d){if(!xxdialogMode){var e="",v=xxStorage.content[b][c][a];""!=b&&(e+=addHtmlValue("Vendor",b));""!=c&&(e+=addHtmlValue("Application",c));e+=addHtmlValue("Name",a);e+=addHtmlValue("Size",v.size+" bytes");v.link&&(e+=addHtmlValue("Link",v.link));setDialogMode(11,"Storage Item",5,showStorageDetailsEx,e,d)}}
1385 function showStorageDetailsEx(b,c){2==b&&wsstack.comm.PerformAjax("",storageDeleteResponse,null,0,"/amt-storage/"+c,"DELETE")}function storageDeleteResponse(b,c){200!=c?messagebox("Storage",format("Unable to delete file (ERR{0}), check that the computer is powered on.",c)):PullStorage()}function DownloadFromStorage(b,c,a){xxdialogMode||(haltEvent(a),wsstack.comm.PerformAjax("",DownloadFromStorageEx,c,0,"/amt-storage/"+b,"GET"))}
1386 function DownloadFromStorageEx(b,c,a){200!=c||null==b?console.log(c,"Data = null"):saveAs(data2blob(b),a)}function OpenFromStorage(b,c){if(!xxdialogMode){haltEvent(c);var a=window.open("http://"+wsstack.comm.host+":"+wsstack.comm.port+"/amt-storage/"+b,"_blank","noopener,noreferrer");a.opener=null;a.focus()}}